"Reverse" of the problem if finding k-th smallest element in a tree: I had to find k-th largest.
Software Enginner Interview Questions
420,052 software enginner interview questions shared by candidates
Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where each path's sum equals targetSum.
In most cases you need to have some experience with CUDA. If you want to increase your chances of getting a job offer you need to know very well about linked lists. We used the collabedit.com for the interview. It is like a chat but for coding. I got the following question on the screen of collabedit: // There is a chunk of memory in the kernel address space represented by kernelResource and an API exists to clear it. An IOCTL path exists to take a request from user-mode and using O/S services eventually dispatches to API_ZeroResource. From a security perspective what concerns do you have with this implementation? How would you fix them? // // KERNEL // BYTE kernelResource[10] = {0}; int API_ZeroResource( in_params *pParams ) { if (pParams->offset + pParams->length > sizeof(kernelResource)) return ERR_INVALID_LIMIT; memset(kernelResource + pParams->offset, 0, pParams->length); return 0; } // // USER // void ZeroResource() { in_params params = { ??? }; // an ioctl path exists to call API_ZeroResource ioctl( CMD_ZeroResource, ¶ms ); }
Write function to calculate sum of first N powers of 2 starting from 1. You shouldn't use any built-in function for calculating power. Implement the most efficient solution.
Varied behavioral questions. Technical focused on oops concepts(explain 4 pillars of OOP with examples). Was asked to write code to print the largest number in an unsorted integer array of infinite size. Although the position was for C#, they were cool about me coding in java.
if p1 and p2 are two consecutive prime number, in which cases (p1 + p2) / 2 is a prime number.
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.
Given a triangle, determine if its a scalene, equilateral, isosceles or neither... required knowledge of triangle properties, I learnt these properties about two decades ago so ofcourse I was fuzzy on the details, completely unexpected
What is a class?
Viewing 1181 - 1190 interview questions