Tcs Coding Questions 2021

for(int i = 0; str[i] != '\0'; i++) if(freq[str[i]] > max) max = freq[str[i]];

matrix of 0s (empty) and 1s (full), find the row index with the maximum number of 1s. Mixed Series cap N raised to the t h power : Find the cap N raised to the t h power term of a series like (often a combination of two different geometric series). Trainee Oxygen Levels

import java.util.Scanner;

brute-force solutions will usually time out. Practice optimizing your code to using techniques like prefix sums, hash maps, and sorting.

is greater than available, return "INVALID INPUT." When candies fall below a threshold , the jar is refilled. Tcs Coding Questions 2021

Examples:

High-level "Digital" roles often feature string manipulation or number theory. Problem Statement: for(int i = 0; str[i]

12 45 33

Given a number (up to 100 digits), find the absolute difference between the sum of digits at odd positions and even positions. Key Strategy: Handle Large Input : Since the number can have 100 digits, read it as a Practice optimizing your code to using techniques like

Question 3: Vehicle Production System (Linear Equations / Mathematics)

Like Us on Facebook