+7 (8482) 63-53-68
sale@slikcom.ru

Tcs Coding - Questions 2021

The Digital role targets high-tier engineering profiles specializing in advanced technologies (IoT, AI/ML, Cloud). The coding round was highly competitive: 2 advanced coding questions. Time Allocated: 60 minutes.

Input: "listen" , "silent" → Yes. Sort and compare OR frequency count of 26 characters. Tcs Coding Questions 2021

One programming language has a fixed set of keywords: break, case, continue, default, defer, else, for, func, goto, if, map, range, return, struct, switch, type, var . Write a program to determine if a given string input is a keyword or not. A single string. Input: "listen" , "silent" → Yes

def solve_vehicles(v, w): # Constraint validation if w % 2 != 0 or w < 2 or v >= w: return "Invalid Input" # System of equations solution # 2x + 4y = w and x + y = v -> 2v + 2y = w -> 2y = w - 2v y = (w - 2 * v) // 2 x = v - y if x >= 0 and y >= 0: return f"TW = x FW = y" else: return "Invalid Input" # Driver Code if __name__ == "__main__": try: v = int(input()) w = int(input()) print(solve_vehicles(v, w)) except ValueError: print("Invalid Input") Use code with caution. Write a program to determine if a given

Solution in Java:

Помочь с подбором?
Оставьте свои контактные данные. Наш менеджер свяжется с вами, ответит на все вопросы и поможет с подбором дисков
Выбрано: 17
Показать