Tip 1 - Practice Atleast 250 Questions from geeks from geeks and coding ninjas
Tip 2 - Ex- Do atleast 2 good projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume and be confident.
3 Coding Question
1st Question : Finger counting game
2nd Question : Count number of triplets with product equal to given number
3rd Question : K’th Smallest/Largest Element in Unsorted Array



1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Store all the elements in a hash_map with their index.
Consider all pairs(i, j) and check the following:
If (arr[i]*arr[j] !=0 && (m % arr[i]*arr[j]) == 0), If yes, then search for ( m / (arr[i]*arr[j]) in the map.
Also check m / (arr[i]*arr[j]) is not equal to arr[i] and arr[j].
Also, check that the current triplet is not counted previously by using the index stored in the map.
If all the above conditions are satisfied, then increment the count.
Return count.



n = 5, k = 2 and arr[] = {6, 5, 4, 8, 7}
The array elements in sorted order are [4, 5, 6, 7, 8]. The ‘2-nd’ smallest element in the array is 5, so the answer is 5.
1. Don’t print anything. Return the value of ‘k-th’ smallest element.
2. ‘k’ is a positive integer and not greater than the size of the array.
3. The array ‘arr’ is unsorted, and all the elements of the array are distinct.
The idea is to randomly pick a pivot element. To implement randomized partition, we use a random function, rand() to generate index between l and r, swap the element at randomly generated index with the last element, and finally call the standard partition process which uses last element as pivot.
The interviewer was very friendly. He asked me to introduce myself
Then he asked me some question Find GCD of two numbers
Just approach
At this point he asked me difference between process and thread.
Top view of binary tree
First we discussed approach He gave m test case where my approach is failing and gave me time to think and i come up with correct approach and then he asked me to write full code on pen-paper and i did it.



You are given ‘X’ as 20 and ‘Y’ as 15. The greatest common divisor, which divides both 15 and 20, is 5. Hence the answer is 5.
For finding GCD of two numbers we will first find the minimum of the two numbers and then find the highest common factor of that minimum which is also the factor of the other number.



Input: Let the binary tree be:

Output: [10, 4, 2, 1, 3, 6]
Explanation: Consider the vertical lines in the figure. The top view contains the topmost node from each vertical line.
The idea is to do something similar to vertical Order Traversal. Like vertical Order Traversal, we need to put nodes of same horizontal distance together. We do a level order traversal so that the topmost node at a horizontal node is visited before any other node of same horizontal distance below it. Hashing is used to check if a node at given horizontal distance is seen or not.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: