i
Apple
Work with us
Filter interviews by
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 ...
Find the maximum GCD of a pair of elements in an array of positive integers.
Iterate through all pairs of elements in the array to find their GCD.
Keep track of the maximum GCD found so far.
Use Euclidean algorithm to calculate GCD efficiently.
Return the maximum GCD value found.
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 t...
Find the marker value needed for Kevin to eat at least 'M' fruits from 'N' buckets.
Iterate through each test case and calculate the marker value needed based on the number of fruits in each bucket.
Subtract the marker value from the number of fruits in each bucket and check if the total is at least 'M'.
Return the highest possible marker value for each test case.
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 umb...
Given 'N' types of umbrellas with different capacities, find the minimum number of umbrellas required to shelter exactly 'M' people.
Iterate through the umbrella capacities and try to cover 'M' people using the minimum number of umbrellas.
Keep track of the total number of people covered and the number of umbrellas used.
If it is not possible to cover 'M' people exactly, return -1.
Return the minimum number of umbrell...
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 c...
Calculate the earliest day on which Ninja can buy all candies given the number of candy types, special offers, and Ninja's candy preferences.
Iterate through each day and check if any special offers are available for the candies Ninja wants to buy.
Keep track of the remaining candies Ninja needs to buy and the coins he has each day.
Consider both regular price and sale price while making purchases.
Return the earliest...
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
...
Find the minimum distance Santa must travel to distribute 'K' gifts to 'K' different children standing in a straight line.
Sort the array 'distance' to easily calculate the minimum distance Santa has to walk.
Calculate the difference between adjacent elements in the sorted array and sum the first 'K-1' differences to get the minimum distance.
Return the minimum distance Santa has to walk for each test case.
I appeared for an interview in May 2021.
Round duration - 45 minutes
Round difficulty - Medium
This round was scheduled in the morning hours from 10:30 to 11:15 AM. I was informed about the round 2 days earlier through an e-mail and a phone call both.
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 ...
Round duration - 45 minutes
Round difficulty - Hard
After the first round, some candidates were shortlisted and I was one of them which was scheduled 2 days later at the same time.
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 um...
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
...
Round duration - 30 minutes
Round difficulty - Medium
It was a simple conversation, no shortlisting was done here, all of the students who passed the previous round were offered the role.
Tip 1 : Aptitude is must.
Tip 2 : Practice puzzle problems.
Tip 3 : Do atleast 2 projects.
Tip 1 : projects should be well mentioned
Tip 2 : also don't forget to mention your grades of all academic levels
I appeared for an interview in Mar 2021.
Round duration - 45 minutes
Round difficulty - Hard
Interview was conducted at zoom in the evening hours.
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...
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 ...
Round duration - 30 minutes
Round difficulty - Medium
This round was scheduled in the morning hours from 10:30 to 11 am. The interviewer was cool-minded and I really enjoyed talking to him.
Tip 1 : Data structures and algorithms are the most fundamental and important thing to prepare.
Tip 2 : Don't ignore OOPS.
Tip 3 : Solve DSA questions regularly.
Tip 1 : Avoid unnecessary details like hobbies, date of birth, parent's name, photo, etc., and keep it one-pager.
Tip 2 : Add a link to your GitHub, LinkedIn, website, phone number, etc.
Top trending discussions
I appeared for an interview before Sep 2020.
Round duration - 180 minutes
Round difficulty - Easy
The round had 3 problems to solve. There were multiple sets and each candidate had a different set of problems to solve.
- Timing: Afternoon (2pm - 5 pm)
- Environment: In a college environment with invigilators present to avoid any bad practices.
Given a tree with 'N' nodes and 'N - 1' distinct edges, along with two nodes 'N1' and 'N2', find and print the shortest path between 'N1' and 'N2'.
A tree is a ...
Find the shortest path between two nodes in a tree.
Use Breadth First Search (BFS) algorithm to find the shortest path in a tree.
Start BFS from one of the nodes and keep track of the parent of each node to reconstruct the path.
Once both nodes are reached, backtrack from both nodes to the root to find the common ancestor and then reconstruct the path.
Consider implementing a function to find the LCA (Lowest Common Ancesto...
Count the number of leaf nodes present in a given binary tree. A binary tree is a data structure where each node has at most two children, known as the left child and the...
Count the number of leaf nodes in a binary tree.
Traverse the binary tree and count nodes with both children as NULL.
Use recursion to check each node in the tree.
Leaf nodes have no children, so their left and right children should be NULL.
Keep track of the count of leaf nodes as you traverse the tree.
Round duration - 60 minutes
Round difficulty - Medium
It was a pen and a paper round. We were required to solve a problem with pen and paper. Also, we were not allowed to use an inbuilt data structure and algorithm.
Given a maze represented as a binary rectangular matrix of size M*N, where each element can either be 0 or 1, determine the length of the shortest path fro...
Find the length of the shortest path in a binary maze from a given source to destination.
Use Breadth First Search (BFS) algorithm to find the shortest path in the binary maze.
Create a queue to store the cells to be visited and keep track of visited cells to avoid revisiting them.
Check for valid moves in all four directions and update the distance to reach each cell.
Return the length of the shortest path if it exists, e...
Round duration - 20 minutes
Round difficulty - Easy
It was the first and only face to face interview. The round was majorly about Data structures and algorithms. Some people were also asked some standard puzzles.
Determine whether a given integer N
is a power of two. Return true
if it is, otherwise return false
.
An integer 'N' is considered a power of two if it can be e...
Check if a given integer is a power of two or not.
Check if the given integer is positive.
Use bitwise operations to determine if it is a power of two.
Return true if it is a power of two, false otherwise.
You are given a string STR
which contains alphabets, numbers, and special characters. Your task is to reverse the string.
STR = "abcde"
"e...
Reverse a given string containing alphabets, numbers, and special characters.
Iterate through the string from the end to the beginning and append each character to a new string.
Use built-in functions like reverse() or slicing to reverse the string.
Handle special characters and numbers while reversing the string.
Ensure to consider the constraints on the input size and number of test cases.
Tip 1 : Competitive programming plays a major role when you are appearing for coding rounds as a fresher. In the coding rounds, you won't get direct problems copied from Geeksforgeeks or Leetcode. You would be required to use your logical thinking to go ahead in the process. This is where competitive programming helps.
Tip 2 : Coding rounds are all about Coding + Timing. Most people fail to excel due to the pressure of a timer ticking on your head. So, instead of just solving problems, try to participate in timed contests. This will help you be used to the pressure of the timer.
Tip 3 : Many big companies like Microsoft, Amazon, and even Google expect you to be good at standard problems. So, once you are done with coding round by your logical skills and competitive programming, you must be well versed with some standard problems in order to excel.
Tip 4 : Patience is the key to success. The internships and placements are a little luck-based. You may fail despite being an amazing programmer due to the pressure of situations. It's important to give yourself time, stay calm, and learn from your mistakes.
Tip 5 : Do at least 1 good project for internship and 2 good projects for placement interviews.
Tip 6 : Your practice is not defined by the number of problems you solve. It is defined by how you solve the problem. Memorizing 500 problems may not get you a job. But understanding the concept and DSA behind 200 problems may make you excel and help you get a job at Google.
Tip 1 : Make it short, crisp, and simple. It is always good to have a 1 pager resume.
Tip 2 : Resume must comprise of the following: Educational Qualifications, Technical skills, Projects, Work experience (if any), Achievements. Other than this, you may include some extra co-curricular achievements.
Tip 3 : Keep a balance in your resume. A resume having 6-7 projects and no DSA skills are not good. Similarly, a resume full of competitive programming achievements is not good. A resume must have both in a balanced way. 3-4 projects is more than sufficient.
I applied via Naukri.com and was interviewed before Jul 2020. There were 4 interview rounds.
I appeared for an interview before Nov 2020.
Round duration - 90 Minutes
Round difficulty - Medium
It was in the morning at our institute. There were technical and aptitude problems.
Develop a function to print star patterns based on the given number of rows 'N'. Each row in the pattern should follow the format demonstrated in the example.
The picture illustra...
Round duration - 30 Minutes
Round difficulty - Medium
It was actually a Techno HR round. I was asked some technical questions about OS, OOPS, COMPUTER NETWORKING, WEB DEVELOPMENT. He went through my whole resume, asked about all the projects and past working experiences. The interviewer was really good, we talked about so many other topics, from Women empowerment to Water Crises. I felt really confident while speaking because he made me so comfortable.
Selection sort is a sorting technique that works by repeatedly finding the minimum element (considering ascending order) from the unsorted part and placing it at the beginning of ...
Tip 1 : Study data structures thoroughly and practice coding regularly. Do practice it on Leetcode as it has a lot of test cases, I personally find it really helpful.
Tip 2 : Learn new skills and make projects with them to get the most out of them.
Tip 3 : Do study other basic and very important subjects like Oops, DBMS, OS.
Tip 1 : Do mention your achievements and other co curricular activities.
Tip 2 : Your projects are a big highlight, keep them crisp and be prepared to explain them thoroughly.
I appeared for an interview before Sep 2020.
Round duration - 60 minutes
Round difficulty - Easy
The round was taken on Cocubes platform with video enabled . The time I chose was 3:00 P.M.
Given a linked list where each node contains a single digit, your task is to construct the largest possible number using these digits.
Print ...
Given a linked list of single digits, construct the largest number possible.
Traverse the linked list to extract the digits
Sort the digits in descending order
Concatenate the sorted digits to form the maximum number
Round duration - 60 Minutes
Round difficulty - Medium
The coding problems were medium and it was held online on Cocubes at 4:00 PM
Given a binary tree with 'N' nodes, identify the path from a leaf node to the root node that has the maximum sum among all root-to-leaf paths.
All the possibl...
Determine if a given graph is bipartite. A graph is considered bipartite if its vertices can be divided into two disjoint sets, 'U' and 'V', such that every edge connects a vertex in...
Check if a given graph is bipartite by dividing its vertices into two disjoint sets.
Create two sets 'U' and 'V' to divide the vertices
Check if every edge connects vertices from different sets
Use graph traversal algorithms like BFS or DFS to determine bipartiteness
Tip 1 : Prepare OS, DBMS and OOPs also
Tip 2 : Do Competitive Coding Contest from CodeForces.
Tip 3 : Do leetcode 2 months before interviews.
Tip 1 : Have some good coding profiles on various platforms
Tip 2 : Mention some projects or past experience relevant to your stream
I appeared for an interview in Oct 2020.
Round duration - 60 minutes
Round difficulty - Medium
This round was a face to face round held on Cisco webex.
This round was completely on DS-Algo and OOPS.
The level of the questions asked was from medium level to hard level.
Develop a Stack Data Structure to store integer values using two Queues internally.
Your stack implementation should provide these public functions:
Implement a stack using two queues to store integer values with specified functions.
Use two queues to simulate stack operations efficiently.
Maintain one queue for storing elements and another for temporary storage during push operation.
Ensure to handle edge cases like empty stack and maximum size limit.
Example: Push operation involves transferring elements from one queue to another before adding the new element.
You are provided a string STR
of length N
, consisting solely of lowercase English letters.
Your task is to remove all duplicate occurrences of characters i...
Remove duplicate occurrences of characters in a given string.
Use a hash set to keep track of characters seen so far.
Iterate through the string and add non-duplicate characters to a new string.
Return the new string as the result.
You are provided with a singly linked list of integers. Your task is to determine whether the given singly linked list is a palindrome. Return true
if it is a pali...
Given a two-dimensional grid with 'N' rows and 'M' columns consisting of uppercase characters, and a string 'WORD', your task is to determine the number of times the word app...
Count the number of occurrences of a given word in a two-dimensional grid of characters.
Iterate through each cell in the grid and check if the word can be formed starting from that cell in any of the eight directions.
Use backtracking to explore all possible paths while matching the characters of the word.
Keep track of visited cells to avoid revisiting the same cell in the same path.
Return the count of occurrences of th...
You are given a sequence of numbers, ARR
. Your task is to return a sorted sequence of ARR
in non-descending order using the Merge Sort algorithm.
The Merge Sort...
Tip 1 : Prepare your resume well.
Tip 2 : Deploy your projects so that the interviewer can view it. Also provide a hyperlink on your resume.
Tip 3 : Be thorough with Data Structures and Algorithms. Also prepare well topics such as OS,DBMS.
Tip 1 : Deploy your projects so that the interviewer can view it. Also provide a hyperlink on your resume
Tip 2 : It's not important to have fancy projects. Only mention those on which you're confident.
I appeared for an interview before Sep 2020.
Round duration - 180 Minutes
Round difficulty - Medium
1 coding question, 3 hours to solve, 50 test cases.
Problem level - medium
Platform ide - okayish
Given N houses in a village, determine the minimum cost to supply water to all houses either by building wells in the houses or by connecting them with pipes.
Determine the minimum cost to supply water to all houses in a village by building wells or connecting them with pipes.
Iterate through all possible connections and choose the minimum cost between building a well or connecting two houses with a pipe.
Use a minimum spanning tree algorithm like Kruskal's or Prim's to find the optimal cost.
Consider the cost of building wells and connecting pipes to minimize the total cost.
Ex...
Round duration - 40 minutes
Round difficulty - Medium
Mixed round, Problem solving, cpp fundamentals, OOP, resume
Tip 1 : Never leave any topic from any chapter / Subject
Tip 2 : Learn to explain your thoughts well
Tip 3 : Learn from previous experiences / interviews / problems asked.
Tip 4 : Atleast 4 projects in Resume
Tip 1 : Atleast 4 projects on Resume
Tip 2 : Do not write false things. You always get caught. Be genuine.
Balloon Burst Problem - Given n balloons, each with a number of coins, maximize the number of coins collected by bursting the balloons.
Use dynamic programming to solve the problem
Consider each balloon as the last balloon to be burst
Calculate the maximum coins that can be collected for each subarray of balloons
Use the calculated values to find the maximum coins for the entire array
I appeared for an interview before May 2021.
Round duration - 24 hours
Round difficulty - Easy
It was a hackathon we were given a problem statement and we had to solve that within 2 days. There were team of 4 people.
The design process for building a chatbot involves defining user goals, choosing a platform, designing conversation flow, implementing natural language processing, and testing for accuracy.
Define user goals and objectives for the chatbot
Choose a platform or framework for building the chatbot (e.g. Dialogflow, Microsoft Bot Framework)
Design the conversation flow and user interactions
Implement natural language processing...
Round duration - 15 minutes
Round difficulty - Easy
HR round
Tip 1 : Do Quants everyday
Tip 2 : Work on your communication skills
Tip 3 : Competitive coding
Tip 1 : don’t brag
Tip 2 : wrote the skills you have
based on 1 review
Rating in categories
Software Engineer
221
salaries
| ₹31.2 L/yr - ₹51 L/yr |
Software Developer
135
salaries
| ₹25.2 L/yr - ₹40 L/yr |
Ipro
117
salaries
| ₹2 L/yr - ₹5 L/yr |
Sales Executive
101
salaries
| ₹2 L/yr - ₹5 L/yr |
Senior Software Engineer
94
salaries
| ₹32.2 L/yr - ₹58.8 L/yr |
Amazon
Microsoft Corporation
Samsung