Tip 1 : Practice variety of problems, try to find patterns rather than learning solutions
Tip 2 : make sure you keep balance in DSA and development.
Tip 1 : Try to do and put some real world projects
Tip 2 : mention platform links that shows your problem solving skills



All the integers in the array appear only once except for precisely one integer which appears two or more times.





Both 'S' and 'K' contain only lowercase English characters.
K = "aabb" and S = "bbcc"
Now Ninja can do the following changes:
- Change ‘b’ to ‘c’ -> “aacc”
- Change ‘a’ to ‘b’ -> “bbcc”
Hence Ninja can give Mico the desired gift.



If the given rectangle is [1, 1, 3, 2]. It means the bottom left corner is at [1, 1] and the top right corner is at [3, 2]. Hence, the top left corner is at [1, 2] and the bottom right corner is at [3, 1].

Two integers are used to represent Point - x and y coordinates.
Two points are used to represent a Rectangle - Bottom left corner and top right corner.
This round was taken by a senior software engineer, focusing on problem solving skills


The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
Step 1 :Traverse every array element and find the highest bars on the left and right sides.
Step 2 : Take the smaller of two heights. The difference between the smaller height and the height of the current element is the amount of water that can be stored in this array element.
Step 3 : interviewer asked me to optimize but wasn't able to



You have an infinite number of elements of each type.
If N=3 and X=7 and array elements are [1,2,3].
Way 1 - You can take 4 elements [2, 2, 2, 1] as 2 + 2 + 2 + 1 = 7.
Way 2 - You can take 3 elements [3, 3, 1] as 3 + 3 + 1 = 7.
Here, you can see in Way 2 we have used 3 coins to reach the target sum of 7.
Hence the output is 3.
The Role was for Backend Developer , and my skills were more inclined to frontend so we discussed about Operating System. The interviewer was very friendly ( even talked about stand-up comedy )
1) In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements:
I. If a process makes a transition D, it would result in another process making transition A immediately.
II. A process P2 in blocked state can make transition E while another process P1 is in running state.
III. The OS uses preemptive scheduling.
IV. The OS uses non-preemptive scheduling.
Which of the above statements are TRUE?
(A) I and II
(B) I and III
(C) II and III
(D) II and IV
Consider the following code fragment:
if (fork() == 0)
{ a = a + 5; printf(“%d,%d\n”, a, &a); }
else { a = a –5; printf(“%d, %d\n”, a, &a); }
Let u, v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE?
(A) u = x + 10 and v = y
(B) u = x + 10 and v != y
(C) u + 10 = x and v = y
(D) u + 10 = x and v != y
Consider the following statements about user level threads and kernel level threads. Which one of the following statement is FALSE?
(A) Context switch time is longer for kernel level threads than for user level threads.
(B) User level threads do not need any hardware support.
(C) Related kernel level threads can be scheduled on different processors in a multi-processor system.
(D) Blocking one kernel level thread blocks all related threads.
A thread is usually defined as a “light weight process” because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the following is TRUE?
(A) On per-thread basis, the OS maintains only CPU register state
(B) The OS does not maintain a separate stack for each thread
(C) On per-thread basis, the OS does not maintain virtual memory state
(D) On per-thread basis, the OS maintains only scheduling and accounting information
onsider the following code fragment:
if (fork() == 0)
{ a = a + 5; printf(“%d,%d\n”, a, &a); }
else { a = a –5; printf(“%d, %d\n”, a, &a); }
Let u, v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE?
(A) u = x + 10 and v = y
(B) u = x + 10 and v != y
(C) u + 10 = x and v = y
(D) u + 10 = x and v != y
Consider the following statements about user level threads and kernel level threads. Which one of the following statement is FALSE?
(A) Context switch time is longer for kernel level threads than for user level threads.
(B) User level threads do not need any hardware support.
(C) Related kernel level threads can be scheduled on different processors in a multi-processor system.
(D) Blocking one kernel level thread blocks all related threads.
A thread is usually defined as a “light weight process” because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the following is TRUE?
(A) On per-thread basis, the OS maintains only CPU register state
(B) The OS does not maintain a separate stack for each thread
(C) On per-thread basis, the OS does not maintain virtual memory state
(D) On per-thread basis, the OS maintains only scheduling and accounting information

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?