Ready to create a quiz? Use Canvas to test your knowledge with a custom quiz Get started
public class Main
public static boolean validPalindrome(String s)
int left = 0, right = s.length() - 1;
while (left < right)
if (s.charAt(left) != s.charAt(right))
return isPalindrome(s, left + 1, right)
left++;
right--;
Key takeaway: Simplicity and correctness matter more than fancy solutions in TCS NQT coding round. Tcs Coding Questions 2021
This story-based problem focused on combinatorics and basic parity. Problem Statement: A man has two bags: Bag A with coins and Bag B with Ready to create a quiz
2 questions with a shared time limit of 90 minutes, requiring knowledge of advanced data structures and algorithms. Allowed Languages: C, C++, Java, Python, and Perl. 2. Most Asked Coding Questions in 2021 Problem Statement: A man has two bags: Bag
Solution Logic:
Iterate through the string. If a character is present in the set of vowels, skip it; otherwise, add it to the result.