Apple
Commerce Pundit Interview Questions and Answers
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
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
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
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
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
Q6. merge two sorted arrays to give a sorted array SV randomization constraints Code to generate sequence of powers of 2
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
Q7. What is the apple computer science
Q8. No of islands(graph)
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
Q9. Reverse a string
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
More about working at Apple
Top HR Questions asked in Commerce Pundit
Interview Process at Commerce Pundit
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month