Tip 1 : Practice 50 puzzle questions
Tip 2 : Practice Arrays and and string questions
Tip 1 : Include 1 internship of at least 3 months
Tip 2 : Include at least 2 projects in your resume
This round had 5 questions to be solved



‘STR’ = “i am a Ninja”, ‘N’ = 3 and ‘WORDS[]’ = [“Ninja”,”a”,”am”]. Then the output should be [1,1,1]. Because the occurrence of “Ninja” in ‘STR’ is 1 and the occurrence of “a” in ‘STR’ is 1.Similarly occurrence of “am” is 1.
The output should be in the same order as given in ‘WORDS’.
I iterated over the sentence and broke it using the spaces. I then used a hashmap to store all the words and iterate there count if it came in sentence more than once



1. It is an empty string, it contains lowercase alphabets only, or
2. It can be written as (S), where ‘S’ is the valid string.
3. It can be written as AB (‘A’ concatenated with ‘B’), where ‘A’ and ‘B’ are valid strings.
Let string be: “co(di()ng”
The valid string can be: “co(di)ng” or “codi()ng”.
The basic idea is to store the indices of the brackets that are not balanced in a stack. We also maintain a hashmap to store the indices that need to be removed. We traverse the string and push open brackets in the stack. If the current character is ‘)’, we check whether the top element is an open bracket and pop it else, we add the current character index in the map. We also add the indices that are present in the stack. We print the valid string without adding the index present in the map.



Order of numbers should be in the non-decreasing matter.
You are given ‘N’ as 12, so the output should be [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], as all single-digit numbers are palindromic, and 11 is also a palindromic number.
In this approach, we try to create all the palindrome integers till N. To create the palindromes of odd length, we remove the last digit from the number and add the remaining digits in reverse order to the previous digits. To generate the palindrome of even length, we add the reverse of the current number to its digits.
It was a fairly easy round and was around basic data structures. He also asked about the projects I had and which languages I have previously worked on



Bubble Sort implementation for the given array: {6,2,8,4,10} is shown below :-
I applied the bubble sort where I used 2 nested and compared the numbers in the loop. I swapped the numbers if the latter was smaller than the former



I ran a for loop until the square root of the number. In the for loop I check if any number smaller than that is completely divisble by the given number by using modulus. If yes then the number is not prime. If not then number is prime

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: