if p1 and p2 are two consecutive prime number, in which cases (p1 + p2) / 2 is a prime number.
Engineers Interview Questions
843,163 engineers interview questions shared by candidates
Find count of unique characters in a given string
Find the nth element in a linked list in constant time and space.
Imagine you have a string and you want to return False if there are repeat characters in this string, what are the fastest and most space efficient ways to do this. (I clarified and he only wanted to return False if there was a repeat letter or number)
Save a tree to an array
implement strtok
Given an unfair coin, devise an algorithm to produce a fair coin's output.
Explain the functionality of linked list?
Probability of a knight making a valid move on NxN matrix in m steps.
Given a string of format '2+3*2-1', calculate and return the result. No parenthesis in the input, just integers and + - * / operators. Operator precedence has to be considered. Linear time complexity and minimal data structure use is preferred.
Viewing 1751 - 1760 interview questions