Tip 1 : Be consistent during your preparation
Tip 2 : Always participate in contest and upsolve atleast one question that you are not able to solve
Tip 1 : Mention good projects
Tip 2 : Do not make resume more than one page



If the given input string is "Welcome to Coding Ninjas", then you should return "Ninjas Coding to Welcome" as the reversed string has only a single space between two words and there is no leading or trailing space.



In a certain code language MADRAS is coded as 'ARSARS', then how will 'MUMBAI' be coded in that language?
Ans : UBIUBI
What is the output of the following SQL query?
SELECT Count(*)
FROM ( ( SELECT Borrower, Bank_Manager
FROM Loan_Records) AS S
NATURAL JOIN ( SELECT Bank_Manager, Loan_Amount
FROM Loan_Records) AS T );
(A) 3
(B) 9
(C) 5
(D) 6
Ans : C


If some path has the letters “xyxxxyzz” then the value of this path will be 4 as the maximum frequency of any letter(‘x’) is 4.
I solved using DP and queue



We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
First I solved using brute force then interviewr asked me to optimised then I solved using map



Input: 'a' = [7, 12, 1, 20]
Output: NGE = [12, 20, 20, -1]
Explanation: For the given array,
- The next greater element for 7 is 12.
- The next greater element for 12 is 20.
- The next greater element for 1 is 20.
- There is no greater element for 20 on the right side. So we consider NGE as -1.
I solved using stack.
The idea is to store the elements for which we have to find the next greater element in a stack and while traversing the array, if we find a greater element, we will pair it with the elements from the stack till the top element of the stack is less than the current element.



You are allowed to break the items.
If 'N = 4' and 'W = 10'. The weights and values of items are weights = [6, 1, 5, 3] and values = [3, 6, 1, 4].
Then the best way to fill the knapsack is to choose items with weight 6, 1 and 3. The total value of knapsack = 3 + 6 + 4 = 13.00
I solved using DP approach.



Input:
'n' = 3, 'w' = 10,
'profit' = [5, 11, 13]
'weight' = [2, 4, 6]
Output: 27
Explanation:
We can fill the knapsack as:
1 item of weight 6 and 1 item of weight 4.
1 item of weight 6 and 2 items of weight 2.
2 items of weight 4 and 1 item of weight 2.
5 items of weight 2.
The maximum profit will be from case 3 = 11 + 11 + 5 = 27. Therefore maximum profit = 27.
I solved using DP
Introduce yourself
Why do you want this job?
Why you are the best fit for job?
How will you work in a team?
Tip 1 : Be polite and show them interest towards company

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?