Tip 1: Be consistent in solving DSA questions daily (aim for 500).
Tip 2: Try to solve a problem before jumping to the solution.
Tip 3: To learn development, don’t just watch tutorials—build as many projects as you can.
Tip 1: Highlight basic achievements in DSA.
Tip 2: Ensure a strong understanding of computer fundamentals.
They first shortlist the students before giving the OA. Then there were 3 DSA questions. The camera and mic were on.



Simply use another vector/array and store the values of nums[nums[i]] in the new vector.


Input: N = 2, K = 6
We need to return all two-digit numbers where the absolute difference between each consecutive digit is ‘6’. Note that ‘06’ is not a valid two-digit number. So, the answer is:
Output: [17, 28, 39, 60, 71, 82, 93]
1. Every number in the answer should not contain leading zeroes. E.g., the number ‘09’ is invalid.
2. You can return the answer in any order.
To find integers with sequential digits in the given range [low, hgh] generate numbers starting from each digit 1-9 appending increasing digits. collect numbers within the range and then sort and return the list.



Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

And chocolates in each packet is : {8, 11, 7, 15, 2}
All possible way to distribute 5 packets of chocolates among 3 students are -
( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Just assign the cookies starting from the child with less greediness to maximize the number of happy children.
2 DSA questions + basic OOPs conceptual questions.



1. There will be no leading zeros in any string in the list ‘BINARYNUMS’.
Consider N = 5 and the list ‘binaryNums’= [“0”, “01”, “010”, “100”, “101”]. This list consists of the binary representation of numbers [0, 1, 2, 4, 5]. Clearly, the missing number is 3 and its binary representation will be “11”. So you should return string “11”.
First I solved this in a brute force approach, using a hashmap
In the second approach, I sort the array, and then find the missing number
The final and optimized approach is to subtract the array_sum from the sum of 1 to n digits



1
/ \
2 3
The root to leaf path 1->2 represents the number 12.
The root to leaf path 1->3 represents the number 13.
The total sum of all the possible root to leaf paths is 12+13 = 25
The output may be very large, return the answer after taking modulus with (10^9+7).
The basic idea is to subtract the value of the current node from the sum until it reaches a leaf node and the subtraction equals 0, then we know that we got a hit. Otherwise, the subtraction at the end could not be 0.
What are the different types of Operating Systems? (Learn)
Tip 1: Computer Fundamentals should be on the tip.
Tip 2: They were more focused towards the Operating System.
2 DSA + 1 Question on ReactJs.



(1) Do not use data types with the capacity of more than 32-bit like ‘long int’ or ‘long long int’ in C++. The problem is meant to reverse the integer using a 32-bit data type only.
(2) You should assume that the environment does not allow storing signed or unsigned 64-bit integers.
First, we declare a variable r and initialize it to 0. Then, each time, find the remainder using the modulus operator and add the remainder to r.



In the below histogram where array/list elements are {2, 1, 5, 6, 2, 3}.
The area of largest rectangle possible in the given histogram is 10.
Initialize left_smaller and right_smaller arrays to track previous and next smaller elements. Compute rectangle areas using these indices and update the maximum area found. This approach runs in O(n} time.
Write a code to implement a thread in the operating system.
Tip 1: Along with theoretical knowledge, you should also have practical knowledge of operating systems.
Tip 2: At least practice basic questions related to operating systems and code them.

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