Add office photos
Premium Employer

Apple

4.3
based on 532 Reviews
Filter interviews by

Commerce Pundit Interview Questions and Answers

Updated 10 Sep 2024

Q1. Kevin and his Fruits Problem Statement

Kevin has 'N' buckets, each consisting of a certain number of fruits. Kevin wants to eat at least 'M' fruits. He is looking to set a marker as high as possible such that i...read more

Add your answer

Q2. Minimum Umbrellas Problem

You are provided with ‘N’ types of umbrellas, where each umbrella type can shelter a certain number of people. Given an array UMBRELLA that indicates the number of people each umbrella...read more

Add your answer

Q3. Ninja and Candies Problem

Ninja, a boy from Ninjaland, receives 1 coin every morning from his mother. He wants to purchase exactly 'N' candies. Each candy usually costs 2 coins, but it is available for 1 coin i...read more

Add your answer

Q4. Lazy Santa Problem Statement

It's Christmas and Santa has 'K' gifts to distribute. There are 'N' children standing in a straight line in the park due to COVID restrictions. You are given an array distance conta...read more

Add your answer
Discover Commerce Pundit interview dos and don'ts from real experiences

Q5. Max GCD Pair Problem Statement

Given an array of positive integers, determine the Greatest Common Divisor (GCD) of a pair of elements such that it is the maximum among all possible pairs in the array. The GCD o...read more

Add your answer

Q6. merge two sorted arrays to give a sorted array SV randomization constraints Code to generate sequence of powers of 2

Ans.

Merge two sorted arrays to give a sorted array and generate sequence of powers of 2 using SV randomization constraints.

  • Create a new array to store the merged result

  • Use two pointers to iterate through the two sorted arrays and compare elements

  • Add the smaller element to the new array and move the pointer for that array

  • Continue this process until all elements are merged

  • To generate sequence of powers of 2, use SV randomization constraints to create a random sequence of powers of ...read more

Add your answer

Q7. What is the apple computer science

Add your answer

Q8. No of islands(graph)

Ans.

Count the number of islands in a graph

  • Use Depth First Search (DFS) or Breadth First Search (BFS) to traverse the graph

  • Mark visited nodes to avoid revisiting them

  • Each connected component represents an island

Add your answer

Q9. Reverse a string

Ans.

Reverse a string by iterating through the characters and swapping them

  • Create a function that takes a string as input

  • Initialize two pointers, one at the beginning and one at the end of the string

  • Swap the characters at the two pointers and move them towards the center until they meet

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Commerce Pundit

based on 12 interviews
Interview experience
4.5
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.0
 • 858 Interview Questions
3.9
 • 406 Interview Questions
4.0
 • 278 Interview Questions
3.6
 • 260 Interview Questions
4.0
 • 178 Interview Questions
3.9
 • 152 Interview Questions
View all
Top Apple Interview Questions And Answers
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
70 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