Tcs Coding Questions 2021 -
Input: 5 → Output: 4 (2²)
public class Main static String Result(String s) String alphabets = "", specialCharacter = ""; for(int i = 0; i < s.length(); i++) (s.charAt(i)>='a' && s.charAt(i)<='z')) alphabets += s.charAt(i); else if(!(s.charAt(i)>='0' && s.charAt(i)<='9')) specialCharacter += s.charAt(i); Tcs Coding Questions 2021
Problem 3: Keyword Search & Extraction (String Manipulation) Input: 5 → Output: 4 (2²) public class
Problems like the 0/1 Knapsack or Longest Common Subsequence were common for higher-paying roles. specialCharacter = ""