Tip 1 : Do at least 2 projects
Tip 2 : Practice coding questions
Tip 3 : Have good knowledge on at least one programming language
Tip 1 : Have good knowledge on what ever skills are mentioned in resume
Tip 2 : Have at least 3 projects




C
Create a recursive function that takes a matrix and some variables (k – starting row index, m – ending row index, l – starting column index, n – ending column index) as parameters
Check the base cases (starting index is less than or equal to ending index) and print the boundary elements in clockwise manner
Print the top row, i.e. Print the elements of kth row from column index l to n, and increase the count of k.
Print the right column, i.e. Print the last column or n-1th column from row index k to m and decrease the count of n.
Print the bottom row, i.e. if k > m, then print the elements of m-1th row from column n-1 to l and decrease the count of m
Print the left column, i.e. if l < n, then print the elements of lth column from m-1th row to k and increase the count of l.
Call the function recursively with the values of starting and ending indices of rows and columns.




1. You are not required to print the output explicitly, it has already been taken care of. Just implement the function and return the ‘K-th’ smallest element of BST.
2. You don’t need to return ‘K-th’ smallest node, return just value of that node.
3. If ‘K-th’ smallest element is not present in BST then return -1.
Traverse the node from root to left recursively until left is NULL.
The node whose left is NULL is the node with minimum value.



• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
For the given BST, if we want to delete the node with data 5 :

The modified BST will be:

Please notice that another valid answer is:

1. The node which we want to delete will always be present in the given tree.
2. If after deletion the tree becomes empty, print -1.
Compare the value of key with the value of root. If the key > root -> value, recursively traverse the right subtree.
If key < root -> value, recursively traverse the left subtree.
While traversing if key == root->value, we need to delete this node:
If the node is a leaf, make root = NULL.
If the node is not a leaf and has the right child, recursively replace its value with the successor node and delete its successor from its original position.
If the node is not a leaf and has left child, but not right child, recursively replace its value by predecessor node and delete its predecessor from its original position.
Return root
Suppose there is a sea in which there are fishes and there is a fisherman who wants to
catch those fishes he has a thread he throws it into the sea with some force. So design a
game with these functionalities considering how far will the thread go and whether he
can catch the fishes or not.
1. Why SAP?
2. What if we don’t select you?
3. What if we select you?
4. Why should we hire you?
5. How will you adapt to new technologies in SAP?

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?