employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Is this your company?

Tata Consultancy Services Interview Question

Medium Coding round - Select the top n students based on the mark. Student has id, name, marks as attribute

Interview Answer

Anonymous

Apr 28, 2025

Created a Student class, implemented a sorting function which sorts based on the mark attribute. Then slicing the first n items.