Tip 1 : practise a lot of programming
Tip 2 : consistency is key
Tip 1: get it reviewed by professional
Tip 2: write only what you know
there were two cp questions and 1hr was given to solve them.



Now that we know how to find an island, to solve this problem, at every position in the matrix, we check if its an island. If we find an island, we sink the island, and return that we have found one. Finally, we sum the number of positions at which we found islands. That’s it!



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.
interview



For the given string “what we think we become”
“what”,” think”, and “become” occurs 1 time, and “we” occurs 2 times in the given string.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?