Online median.
Software Engineers Interview Questions
419,648 software engineers interview questions shared by candidates
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.
Someone can go up on stairs from one or two steps, how many different there is to go up on a stairs with n steps.
Find all (english word) substrings of a given string. (every = every, ever, very)
Fibonacci numbers... haha.
Find the largest 100 numbers out of a list of a trillion unsorted numbers
N pots, each with some number of gold coins, are arranged in a line. You are playing a game against another player. You take turns picking a pot of gold. You may pick a pot from either end of the line, remove the pot, and keep the gold pieces. The player with the most gold at the end wins. Develop a strategy for playing this game.
Capitalize 2nd, 4th, 8th, 16th, … letters in a string input : letters in a string output: lEtTers in a stRing
Two trains traveling in the opposite direction with x and y miles per hour , they are 100 miles apart.Where would they meet ? formula?
Viewing 511 - 520 interview questions