Tip 1: Never skip any topic from any chapter or subject.
Tip 2: Learn to articulate your thoughts clearly.
Tip 3: Learn from previous experiences, interviews, and asked problems.
Tip 4: Have at least four projects on your resume.
Tip 1: Have at least four projects on your resume.
Tip 2: Do not include false information. You will always get caught—be genuine.
Interviews were conducted by a third party on behalf of DealShare. They provided 60 minutes and two coding questions in the first round of the interview.


Consider ARR = [2, 4, 5, 15], all possible good subsets following the given conditions are (2), (4), (5), (15), (2,4), and (5,15). Hence, the total number of good subsets is 6 in this case.
We first count each character (r[ch]) and the number of distinct characters (d_r). These are the initial values for our right substring (thus, indicated as r).
As we move our split point from left to right, we shift the current character to the left substring and update the count and the number of distinct characters in both the left and right substrings.
If the number of distinct characters is equal, we increment the result.



‘POINTS = [ [3, 1], [-1, 3], [2, 0] ]’, ‘N = 3’

The path with minimum time is: ‘[3,1] -> [2,2] -> [1,3] - > [0,3] -> [-1,3] -> [0,2] -> [1,1] -> [2,0]’.
Time taken from [3,1] to [-1,3] = 4 seconds.
Time taken from [-1,3] to [2,0] = 3 seconds.
Total time = 7 seconds. Thus, you should return ‘7’ as the answer.
This round was the Hiring Manager round. He asked questions to assess the depth of the tech stack I have used in my past projects and the work done during my internships. In the end, he concluded the round by asking two quick DSA questions.



Consider the array {2,1,5,6,3,8} and 'K' = 3, the sorted array will be {8, 6, 5, 3, 2, 1}, and the 3rd largest element will be 5.
1) Kth largest element in an array is the kth element of the array when sorted in non-increasing order.
2) All the elements of the array are pairwise distinct.
Build a Max-Heap (MH) using the first K elements (arr[0] to arr[K-1]) of the given array.
For each element after the Kth element (arr[K] to arr[n-1]), compare it with the root of MH.
If the element is smaller than the root, replace the root with this element and call heapify on the Max-Heap (MH).
Otherwise, ignore it.
Finally, the root of the MH is the Kth smallest element.



If there exists no subarray in the given sequence whose sum is divisible by ‘K’ then simply return ‘0’.
Suppose the given array is ‘ARR’ = { 5, 0, 2, 3, 1} and ‘K = 5’.
As we can see in below image, there are a total of 6 subarrays that have the total sum divisible by ‘K’
So we return the integer 6.

Fix the left and right columns one by one and count subarrays for every left and right column pair. Calculate the sum of elements in each row from left to right and store these sums in an array, say temp[]. Here, temp[i] represents the sum of elements from left to right in row i. Count the subarrays in temp[] whose sum is divisible by k. This count represents the number of submatrices with a sum divisible by k, considering the left and right columns as boundary columns. Finally, sum up all these counts for each temp[] corresponding to different left and right column pairs.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?