Category: c / c++
The Interview Question: Assume the Rand5() gives a random integer from 1 to 5. Each possible return is given with the same probability. How do you construct the Rand7() …
You are asked to find the number of order pairs (x, y) such that, and x, y are natural numbers which also satisfy . Mathematics This shouldn’t be too …
You are asked to remove all elements of value val from a integer linked list. For example, Remove 2 from the following list, 1 -> 2 -> 2 -> …
There is a 2D binary matrix M filled with 0’s and 1’s, your task is to find the largest square containing all 1’s and return its area. For example, …
Given a 32-bit DWORD, and two threads A and B, do they require Mutex (exclusive resources) to read/write the High/Low DWORD respectively? e.g. Thread A reads two low bytes …