Add office photos
Engaged Employer

Nagarro

4.0
based on 4.2k Reviews
Video summary
Filter interviews by

Chetan Sales Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Count Ways To Reach The N-th Stair Problem Statement

You are given a number of stairs, N. Starting at the 0th stair, you need to reach the Nth stair. Each time you can either climb one step or two steps. You ha...read more

Ans.

The problem involves finding the number of distinct ways to climb to the Nth stair by taking one or two steps at a time.

  • Use dynamic programming to solve this problem efficiently.

  • The number of ways to reach the Nth stair is the sum of the number of ways to reach the (N-1)th stair and the (N-2)th stair.

  • Handle large inputs by taking modulo 10^9+7 to avoid overflow.

  • Example: For N=3, there are 3 ways to climb to the third stair: (0, 1, 2, 3), (0, 2, 3), and (0, 1, 3).

Add your answer

Q2. Trailing Zeros in Factorial Problem

Find the number of trailing zeroes in the factorial of a given number N.

Input:

The first line contains an integer T representing the number of test cases.
Each of the followi...read more
Ans.

Count the number of trailing zeros in the factorial of a given number.

  • To find the number of trailing zeros in N!, count the number of factors of 5 in the prime factorization of N.

  • Each factor of 5 contributes to a trailing zero in the factorial.

  • For example, for N=10, there are 2 factors of 5 in the prime factorization (5 and 10), so there are 2 trailing zeros.

Add your answer

Q3. Quick and merge time complexity and when worst case happens in quick sort

Ans.

Quick sort has O(n log n) time complexity on average, O(n^2) worst case. Merge sort has O(n log n) time complexity always.

  • Quick sort has an average time complexity of O(n log n) due to its divide-and-conquer approach.

  • Worst case for quick sort occurs when the pivot element is either the smallest or largest element in the array, leading to O(n^2) time complexity.

  • Merge sort always has a time complexity of O(n log n) due to its consistent splitting and merging of subarrays.

Add your answer

Q4. Remove a linked list node without head or tail pointer given

Ans.

Removing a node from a linked list without head or tail pointer

  • Use the node to be removed's next node to copy its data and then delete the next node

  • Update the current node's next pointer to skip the next node

Add your answer
Discover Chetan Sales interview dos and don'ts from real experiences

Q5. Your favorite programming language and why

Ans.

My favorite programming language is Python because of its simplicity, readability, and versatility.

  • Python is known for its clean and readable syntax, making it easy to learn and understand.

  • Python has a large standard library and many third-party libraries, allowing for rapid development of a wide range of applications.

  • Python is versatile and can be used for web development, data analysis, machine learning, automation, and more.

Add your answer

Q6. Remove nth element from array

Ans.

Remove the nth element from an array of strings

  • Use the splice method to remove the element at the specified index

  • Remember that array indices start at 0

  • Example: array.splice(n, 1) will remove the element at index n

Add your answer

More about working at Nagarro

#2 Best Large Company - 2022
#1 Best IT/ITES Company - 2022
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Chetan Sales

based on 4 interviews
5 Interview rounds
Resume Shortlist Round
Aptitude Test Round
Coding Test Round
Technical Round
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Associate Engineer Interview Questions from Similar Companies

3.8
 • 22 Interview Questions
3.7
 • 22 Interview Questions
3.7
 • 20 Interview Questions
4.0
 • 10 Interview Questions
3.7
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter