Tip 1 : Do Leetcode/Code studio/gfg (Atleast 250 questions)
Tip 2 : Prepare your resume well and composed
Tip 3 : Practice your aptitude and HR questions beforehand
Tip 1: Shouldn't exceed 2 pages
Tip 2: Make sure that you don't include too many certifications or skills
Coding Questions of medium-hard level and the time limit was 1 hour only



Let 'ARR' = [1,0,0] then the possible subarrays of 'ARR' will be: {1}, {0}, {0}, {1,0}, {0,0}, {1,0,0}.
If the given array 'ARR' = [1,0,0,0,1,1,0,1]
Then the number of 1’s subarrays will be 5. [{1},{1},{1},{1,1},{1}]
And the number of 0’s subarrays will be 7. [{0},{0},{0},{0,0},{0,0},{0,0,0},{0}]
So our answer will be 5 + 7 = 12.
1. Sort the vector(non-decreasing).
2. First remove all the duplicates from vector.
3. Then use recursion and backtracking to solve
the problem.



There are no leading zeros in both the strings, except the number 0 itself.
Do not use any built-in Big Integer Library.
If, A = 123, and B = 456.
So the product of both numbers will be 56088.
I used regular mathematucal vertical multiplication.
We loop from the end of both numbers, multiply the digits one at a time and save the carry in the next cell for the next iteration.
The loop at the end constructs the result string - we skip 0s at the beginning and add the numbers.
In this round, the interviewer check your Problem-solving skills and ask questions on Computer Science Engineering, Algorithms & concepts and ask 2 to 3 Data Structures Questions and discuss your projects.
What are threads and deadlocks. And what are the preventive measures for a deadlock situation.
Tip 1: Revise your OS basics.
Tip 2: Threads are a way for a program to split itself into two or more simultaneously (or pseudo-simultaneously) running tasks. Deadlocks occur when two or more threads are blocked forever, waiting for each other.
Tip 3: Preventive measures for deadlocks include:
Avoiding the "hold and wait" situation by acquiring all the required resources at once, instead of waiting and acquiring them one by one.
Using "lock-ordering" to avoid a circular-wait situation.
Using a "time-out" mechanism to prevent threads from waiting indefinitely.
Using a "watchdog" thread that periodically checks for and resolves deadlocks.
Avoiding nested locks, where a thread holds a lock while trying to acquire another lock.
Using a non-blocking algorithm to avoid the need for locks altogether.
Use libraries or frameworks that provide deadlock prevention mechanisms.



1. There might be duplicates present in the array.
2. The order of the permutations in the output does not matter.
3. Do not use any kind of in-built library functions to find the answer.
The basic idea is to start with an empty list of permutations and recursively add elements from the input array to the list, while keeping track of the remaining elements that have not yet been used.
Another approach is to use backtracking algorithm, which follows the same idea of recursion but it is slightly different in implementation and it is more efficient than the recursive approach as it avoid recomputation.
This round was taken by the hiring manager or HR.
What are class and object?
Why do we need class and object?
Why do we need oops concept?
Tip 1: A class is a blueprint or template for creating objects
Tip 2: An object is an instance of a class. It has the properties and methods defined by the class, but with specific values assigned to those properties
Tip 3:We need classes and objects because they provide a way to organize and structure code, making it more modular and reusable
Why quicksort is preferred for arrays and merge sort for linked lists.
Tip 1: Quicksort is preferred for arrays because it is an in-place sorting algorithm, meaning that it does not require additional memory space to sort the array.
Tip 2: merge sort is preferred for linked lists because of its efficient merging strategy and not requiring extra memory space.



If the input tree is as depicted in the picture:
The Left View of the tree will be: 2 35 2
Tip 1: To print the left view of a binary tree, we can use a level-order traversal (also known as breadth-first search) of the tree.
Tip 2: The idea is to traverse the tree level by level, starting from the root, and print the first node of each level.



If the given grid is this:
[7, 19, 3]
[4, 21, 0]
Then the modified grid will be:
[7, 19, 0]
[0, 0, 0]

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?