Tcs Coding Questions 2021 ((top)) «2025-2026»

Input: listen silent → Output: True

n = int(input()) arr = list(map(int, input().split())) arr.sort() mid = n // 2 Tcs Coding Questions 2021

Input: arr = [1, 5, 7, 1, 5], K = 6 Pairs: (1,5) at indices (0,1) and (0,3), but unique values? Here values (1,5) is one pair. So answer = 1. Input: listen silent → Output: True n =

Reverse only alphabets in a string, keep special characters at same position. K = 6 Pairs: (1