Tip 1: Practice as many questions as you can.
Tip 2: Complete at least two projects covering both frontend and backend.
Tip 3: Be honest on your resume; ensure you are thoroughly familiar with its contents, both theoretically and practically.
Tip 1: Don't lie on your resume. You should have complete practical knowledge of everything mentioned in it.
Tip 2: Use bullet points for each key detail.




Let 'emails' = ["test.email+alex@ninjas.com", "test.e.mail+bob.case@ninjas.com", "testemail@ninjas.com"].
We need to find the number of unique email addresses after applying the rules.
The first email "test.email+alex@ninjas.com":
The local name is "test.email+alex" and the domain name is "ninjas.com".
Applying the rules to the local name:
Remove '.' -> "testemail+alex"
Ignore everything after '+' -> "testemail"
The processed email address is "testemail@ninjas.com".
The second email "test.e.mail+bob.case@ninjas.com":
The local name is "test.e.mail+bob.case" and the domain name is "ninjas.com".
Applying the rules to the local name:
Remove '.' -> "testemail+bob.case"
Ignore everything after '+' -> "testemail"
The processed email address is "testemail@ninjas.com".
The third email "testemail@ninjas.com":
The local name is "testemail" and the domain name is "ninjas.com".
No '.' or '+' in the local name.
The processed email address is "testemail@ninjas.com".
The unique processed email addresses are {"testemail@ninjas.com"}.
Therefore, the number of different addresses that actually receive mails is 1.



For given 2D array :
[ [ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ] ]
After 90 degree rotation in anti clockwise direction, it will become:
[ [ 3, 6, 9 ],
[ 2, 5, 8 ],
[ 1, 4, 7 ] ]
We mainly need to move first row elements to first column in revers order, second row elements to second column in reverse order.
Input: mat[][] =
{{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11,12}
{13, 14, 15, 16}}
Output:
{{4, 8, 12, 16},
{3, 7, 11, 15},
{2, 6, 10, 14},
{1, 5, 9, 13}}
Let us first try to find out a pattern to solve the problem for n = 4
mat[0][0] goes to mat[3][0]
mat[0][1] goes to mat[2][0]
………………………………………
mat[1][0] goes to mat[3][1]
……………………………………..
mat[3][3] goes to mat[0][3]



A book will be allocated to exactly one ninja.
At least one book has to be allocated to a ninja.
Allotment of the books should be done in a contiguous manner. For example, a ninja can not be allocated book 2 and book 4, skipping book 3.
The idea is to iterate over all possible page limits, or maximum pages that can be allocated to a student.
The minimum possible page limit is the highest page count among all books, as the book with the most pages must be assigned to some student.
The maximum possible page limit is the sum of pages of all books, It is in the case when all books are given to a single student.
To find the number of students that will be allocated books for a page limit, we start assigning books to the first student until the page limit is reached, then we move to the next student and so on. As soon as we find the first page limit with which we can allocate books to all k students, we will return it.

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?