Engineer Developer Interview Questions

466,953 engineer developer interview questions shared by candidates

You are given two integers, p and q. Complete the function calculatePower which takes two integers as arguments and returns p to the power of q, without using the built-in power function. We expect you to do better than O(q). A same input is p = 2 and q = 3, and the corresponding output is 8. Constraints: 0 <= p^q <= ((2^63) - 1)
avatar

Software Developer

Interviewed at AQR Capital Management

4
Jun 21, 2017

You are given two integers, p and q. Complete the function calculatePower which takes two integers as arguments and returns p to the power of q, without using the built-in power function. We expect you to do better than O(q). A same input is p = 2 and q = 3, and the corresponding output is 8. Constraints: 0 <= p^q <= ((2^63) - 1)

u have 10 red socks and 10 blue in ur cupboard .you have to take 1 pair of socks but ur room is completely dark.how many minimum no. of socks required to take so that u ll be sure to get atleast a pair of same coloured socks?
avatar

Software Engineer

Interviewed at e-con Systems

3.8
Mar 4, 2017

u have 10 red socks and 10 blue in ur cupboard .you have to take 1 pair of socks but ur room is completely dark.how many minimum no. of socks required to take so that u ll be sure to get atleast a pair of same coloured socks?

Viewing 521 - 530 interview questions

Glassdoor has 466,953 interview questions and reports from Engineer developer interviews. Prepare for your interview. Get hired. Love your job.