Try to do Data Structures and Algorithms based questions and firstly attempt it yourself before going to the solution, also try to do it as quickly as you can. Also prepare for theory subjects like Operating system, Database Management System, etc which I prepared through Coding Ninjas subjective notes and they are very accurate and up to mark.
Tip 1 : Have some projects on your resume.
Tip 2 : Do not put the wrong things on your resume.
F(n) = F(n-1) + F(n-2),
Where, F(1) = F(2) = 1.
For ‘N’ = 5, the output will be 5.
Nth term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -
F(n) = F(n-1) + F(n-2),
Where, F(1) = 1,
F(2) = 1
Words are separated by one or more whitespace characters.
For the given string “Madam oyo cat”, “Madam”, and “oyo” are the palindrome words
You are given a string S of words. Your task is to find the number of palindrome words in the given string S. A word is called palindrome, if it reads the same backwards as forwards.
Sanyam has ‘N’ candies, he wants to distribute that into ‘K’ of his friends. He made his ‘K’ friends stand in line, in increasing order of his likeness. Not being so smart he gives 1 candy to the first friend, 2 to the second person, and so on till the kth person. In the next turn, the first person gets ‘K + 1’ candies, the second person gets ‘K + 2’ candies, and so on.
While distributing the candies, if at a turn, the number of candies to be given to a friend is less than the required candies, then that friend gets all the remaining candies and Sanyam stops the distribution.
Your task is to find the total number of candies every person has at the end.
Input: [1,2,3,4,5]
Output: [5,4,3,2,1]
Reverse a given stack of integers using recursion.
Note:
You are not allowed to use any extra space other than the internal stack space used due to recursion.
You are not allowed to use the loop constructs of any sort available as handy. For example: for, for-each, while, etc.
The only inbuilt stack methods allowed are:
push(x) -- Push element x onto stack.
pop() -- Removes the element on top of the stack.
top() -- Get the top element.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?