0% found this document useful (0 votes)
5 views42 pages

TCSTop 50 Questions

The document outlines a series of coding questions aimed at preparing for the TCS NQT 2025 exam, covering various programming challenges such as finding the smallest or largest numbers, reversing arrays, and identifying palindromic numbers. Each question includes specific input and output requirements, as well as example cases to illustrate the expected results. The topics range from basic algorithms to more complex data handling tasks, suitable for software engineering candidates.

Uploaded by

21it036
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
5 views42 pages

TCSTop 50 Questions

The document outlines a series of coding questions aimed at preparing for the TCS NQT 2025 exam, covering various programming challenges such as finding the smallest or largest numbers, reversing arrays, and identifying palindromic numbers. Each question includes specific input and output requirements, as well as example cases to illustrate the expected results. The topics range from basic algorithms to more complex data handling tasks, suitable for software engineering candidates.

Uploaded by

21it036
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 42
TCS NQT 2025 Top 50 Coding Questions GED eee) ‘question: Rahulis 0 softwore engineer at a locisties company. His teum is developing an automoted system to track the ‘weights of diffrent parcels being hipped. To optimize the packaging process, Rahul needs to identity the lightest pares! trom a gen ist of parca weights. Wite © program to help Rohul that takes an array of integers representing the welghts of parce's end finds the smallest weight. Input: + The fist ine contsins an integer N(1«N < 1000), the numberof parcels + The second line contains N/space-separated integers representing the weight of each parcel (1s weights 0 Output Print the smallest weight, Brome: Input 5 301245208 ‘output 8 res catrg aioe question = ‘A meteorological department is tracking the highest recorded temperatures across diferant cites. To analyze ‘global warming trends, they need to determine the maximum temperatute rom a given dataset. \write @ program that finds the highest temparatute recorded ina given list Input: + First ine contains an integer N (I N +1900), the numberof cities. + Second line contains N space-separoted integers representing temperatures (~100 < ternp s 100). Output: Print the high comple: Input 4 -5231930 3 temperature recorded. output: 0 Links in the Description prepinsta.com/instagram/ prepinsta.com/discord/ facebookcom/prepinstal prepinsta.comn/Whatsapp! B8esu00 prepinsta.com/ Telegram) Tes Coding Questions Question 3 A librarian is digtzing old books and needs to store page numbers in reverse erder for ahistorical reference system. Help the brarian reverse the order of a given let of page numbers. Input + First ine contains an integer N (1 N < 1000), the number of pages. + Second line contains N space-soparated integers representing the page numbers. output: Print the reversed array. Example Input: 5 102030 4050 output: {50.4020 2010 CED Herein) ‘Question 4: ‘An ancient manusctipt contains secret numerical codes, and the archaeologists suspect thet palindromic numbers hold hidden meanings. They need a tool to identity whether a given number isa palindrome or nat. Input: ‘single Integer N (1: N-<105), output: Print"YES" I the number is a palindrome, otherwise print ‘NO’ Exampre Inpat 1221 ‘Output: YES Input us ‘output: No. Question 5 {A space research team i entitying symmetrical asteroids whose Ib numbers are palindromes. They need ‘program to find all palindromic numbers in a given ronge. Input. Two integers Land R(1

You might also like