The Beat Beginner
Lessons
Songs Beats & Fills Technique Rudiments Drummers Gear
Drumeo
SAVE 38% ON THE DRUMEO ANNIVERSARY DEAL 1 YEAR OF DRUM LESSONS + FREE IN-EAR MONITORS ($149 VALUE)

Tcs Coding Questions 2021 2021 [ SAFE ✭ ]

Pamela Lynn-Seraphine  /  UPDATED Jan 24, 2023

if(flag == 1) cout << "True"; else cout << "False";

"1001" → Choose substring indices 1 to 3 ("001")? Actually original: 1 0 0 1. Pick substring positions 2-4 (0,0,1) has only one '1'. Not allowed. This was so tricky that TCS 2021 actually had a simpler version: Count the number of groups of consecutive '1's.

arr = list(map(int, input().split())) target = int(input()) print(count_pairs(arr, target))

Good luck. Your TCS career starts with a single System.out.println("Hello World"); — make it count.

Anniversary Deal
SAVE 38% ON THE DRUMEO ANNIVERSARY DEAL 1 YEAR OF DRUM LESSONS + FREE IN-EAR MONITORS ($149 VALUE)
Tcs Coding Questions 2021