Desarrollador De Software Python Interview Questions

5,396 desarrollador de software python interview questions shared by candidates

Implement the power(int b > 0, int n >= 0) function. What is its time complexity? Extend the function to also accept int n < 0. Assuming the time complexity of the implemented function was O(n), also implement an O(log n) variant. Note that use of recursion is acceptable for the O(log n) implementation, but not for the O(n) implementation. Only an iterative implementation is acceptable for the O(n) variant.
avatar

Python Developer

Interviewed at HedgeServ

3.7
Dec 26, 2016

Implement the power(int b > 0, int n >= 0) function. What is its time complexity? Extend the function to also accept int n < 0. Assuming the time complexity of the implemented function was O(n), also implement an O(log n) variant. Note that use of recursion is acceptable for the O(log n) implementation, but not for the O(n) implementation. Only an iterative implementation is acceptable for the O(n) variant.

What is the formula for determining the number of permutations? Write a function to return the permutations of a given string, e.g. "abc", that are equal to the length of the given string. If this function is implemented using itertools, also implement one without using itertools. Note that use of recursion is acceptable.
avatar

Python Developer

Interviewed at HedgeServ

3.7
Dec 26, 2016

What is the formula for determining the number of permutations? Write a function to return the permutations of a given string, e.g. "abc", that are equal to the length of the given string. If this function is implemented using itertools, also implement one without using itertools. Note that use of recursion is acceptable.

Viewing 1431 - 1440 interview questions

Glassdoor has 5,396 interview questions and reports from Desarrollador de software python interviews. Prepare for your interview. Get hired. Love your job.