How do you find 2 missing elements in an array of consecutive integers that are not sorted who's size is N-2.
Software Interview Questions
550,468 software interview questions shared by candidates
Search on an unsorted list with a time complexity of O(logn)
Iterating through a k-dimensional array given size of each dimension in an array.
What is a setter/ what is a getter? What is their purpose?
The programming test was quite difficult Math problem, it had to be solved precisely and every case must be handled carefully to ensure correct program outcome.
Implemented the basic data structure. And followed up with several small questions.
Given a list of words, right a function to return a list of pairs of palindromes
Online median.
Consider a queue between the two processes indicated below. N is the capacity (maximum length) of the queue; e, f, and b are semaphores. "P" refers to the operation of acquiring (decrementing) a semaphore, and "V" refers to the operation of releasing (incrementing) a semaphore. init() { e = N; f = 0; b = 1; queue = EMPTY; } process1() { for(;;) { P(e); P(b); queue.enqueue(...); V(b); V(f); } } process2() { for(;;) { P(f); P(b); ... = queue.dequeue(); V(b); V(e); } } Which of the following statements is (are) true? (Zero or more may be correct.) a. The purpose of semaphore f is to ensure that dequeue is not executed on an empty queue. b. The purpose of semaphore e is to ensure that deadlock does not occur. c. The purpose of semaphore b is to provide mutual exclusion for queue operations. d. None of the above.
Given the pre-order and in-order traversing result of a binary tree, write a function to rebuild the tree.
Viewing 601 - 610 interview questions