Graduate Trainee
500+ Graduate Trainee Interview Questions and Answers

Asked in Flipkart

Q. Given an array, how do you find the number of pairs that sum to an even number?
Count the number of pairs in an array that sum to an even number.
Iterate through the array and check each pair of elements.
If the sum of the pair is divisible by 2, increment the count.
Return the count of pairs that sum to an even number.

Asked in Freshworks

Q. Invert a Binary Tree
You are provided with a Binary Tree and one of its leaf nodes. Your task is to invert this binary tree, making sure to adhere to the following guidelines:
- The given leaf node becomes the r...read more
Invert a binary tree with a given leaf node as the new root, following specific guidelines.
Start by identifying the leaf node provided in the input.
Follow the guidelines to invert the binary tree with the leaf node as the new root.
Ensure that the left child becomes the right child of the new root if available, and the parent becomes the left child.
Implement the inversion process for each test case and output the resulting binary tree in the same format as the input.
Graduate Trainee Interview Questions and Answers for Freshers

Asked in Blackrock

Q. Merge Two Sorted Arrays Problem Statement
Given two sorted integer arrays ARR1
and ARR2
of size M and N, respectively, merge them into ARR1
as one sorted array. Assume that ARR1
has a size of M + N to hold all ...read more
Merge two sorted arrays into one sorted array in place.
Iterate from the end of both arrays and compare elements to merge in place
Use two pointers to keep track of the current position in each array
Update the elements in ARR1 from the end to the beginning

Asked in Freshworks

Q. Deepest Left Leaf Node Problem Statement
You are provided with a binary tree consisting of 'N' nodes. Your goal is to identify the deepest leaf node that is a left child of some node within the given binary tre...read more
Identify the deepest left leaf node in a binary tree.
Traverse the binary tree in level order to find the deepest left leaf node.
Keep track of the maximum depth and the value of the deepest left leaf node found so far.
Return the value of the deepest left leaf node at the end.

Asked in Optum Global Solutions

Q. Consonant Counting Problem Statement
Given a string STR
comprising uppercase and lowercase characters and spaces, your task is to count the number of consonants in the string.
A consonant is defined as an Engli...read more
Count the number of consonants in a given string containing uppercase and lowercase characters and spaces.
Iterate through each character in the string and check if it is a consonant (not a vowel).
Keep a count of the consonants encountered while iterating through the string.
Return the total count of consonants at the end.

Asked in Expedia Group

Q. Valid Parentheses Problem Statement
Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.
Input:
The first line contains an integer...read more
The task is to determine if a given string consisting of parentheses is balanced or not.
Iterate through each character in the string and use a stack to keep track of opening parentheses
If an opening parenthesis is encountered, push it onto the stack
If a closing parenthesis is encountered, check if it matches the top of the stack. If it does, pop the stack, else return 'Not Balanced'
At the end, if the stack is empty, return 'Balanced', else return 'Not Balanced'
Graduate Trainee Jobs

Asked in Flipkart

Q. Flipkart charges a shipping fee for orders below Rs. 500. How can you avoid this fee if you have an item costing less than Rs. 500 and you don't want to pay for shipping?
Add more items to the cart to reach the minimum order amount of Rs. 500 and avoid shipping charges.
Check for other items that you may need and add them to the cart
Look for items that are on sale or have discounts to reach the minimum order amount
Consider buying in bulk to save on shipping charges
Check if there are any promo codes or coupons available to waive off shipping charges

Asked in Freshworks

Q. Reverse Integer Problem Statement
Given a 32-bit signed integer N
, your task is to return the reversed integer. If reversing the integer causes overflow, return -1
.
Input:
The first line contains an integer 'T'...read more
Reverse a 32-bit signed integer and handle overflow cases.
Implement a function to reverse the given integer.
Check for overflow conditions and return -1 if overflow occurs.
Use 32-bit capacity data types only.
Example: For input 123, output should be 321.
Share interview questions and help millions of jobseekers 🌟

Asked in Flipkart

Q. Given the probability distribution of sales in various areas, how do you group items ordered at different points in time to ensure they reach customers in the shortest possible time?
Group items ordered at different points of time based on probability distribution of sales to ensure shortest delivery time.
Analyze the probability distribution of sales in various areas
Identify the areas with higher sales probability and prioritize them
Group items ordered from the same area together
Use efficient delivery routes to minimize delivery time
Utilize technology to track and optimize delivery routes
Collaborate with logistics team to ensure timely delivery
Regularly r...read more

Asked in MakeMyTrip

Q. Sub Sort Problem Statement
You are given an integer array ARR
. Determine the length of the shortest contiguous subarray which, when sorted in ascending order, results in the entire array being sorted in ascendi...read more
Find the length of the shortest subarray that needs to be sorted to make the entire array sorted in ascending order.
Iterate from left to right to find the first element out of order.
Iterate from right to left to find the last element out of order.
Calculate the length of the subarray between the out of order elements.

Asked in TCS

Q. 1.what is cloud computing?? 2. How many types of clouds? 3. What is Virtualization? 4. Difference between Saas and Paas? 5. What are data types? 6. What is Artificial Intelligence? 7. Write a program to print p...
read moreAnswers to technical questions related to cloud computing, programming, and software development.
Cloud computing is the delivery of computing services over the internet.
There are three types of clouds: public, private, and hybrid.
Virtualization is the creation of a virtual version of something, such as an operating system, server, storage device, or network resource.
SaaS (Software as a Service) provides software applications over the internet, while PaaS (Platform as a Servic...read more

Asked in Flipkart

Q. Given an array, how do you find the number of pairs that sum to an odd number?
Count the number of pairs in an array that sum to an odd number.
Iterate through the array and check each pair of elements.
Use a nested loop to compare each element with every other element.
Keep a count of pairs that sum to an odd number.

Asked in Flipkart

Q. How can you obtain 720 using six zeros and mathematical operators?
To make 720 with 6 zeroes, multiply 6! by 1000.
Calculate the factorial of 6 (6! = 6 x 5 x 4 x 3 x 2 x 1 = 720)
Multiply the result by 1000 (720 x 1000 = 720000)
Alternatively, add three zeroes to the end of 720 (720000 = 720000)

Asked in TCS

Q. We use multiple inheritance in C++. Does java supports it? If not then what java used instead of multiple inheritance?
Java does not support multiple inheritance. It uses interfaces to achieve similar functionality.
Java supports single inheritance, where a class can only inherit from one superclass.
To achieve multiple inheritance-like behavior, Java uses interfaces.
Interfaces allow a class to implement multiple interfaces, providing access to multiple sets of methods and constants.
Unlike classes, interfaces cannot be instantiated and can only be implemented by classes.
Example: class A impleme...read more

Asked in Essex Lake Group

Q. There is a five-story building with one exit at the bottom and one at the top. It takes 1 minute to go from one floor to another. There are n people in the building. There is a fire, and no one can see anything...
read more
Asked in Infosys

Q. how does an aeroplane flies?what is the mechanism etc
An airplane flies by generating lift through its wings and using engines to propel it forward.
Airplane wings are designed to create lift by creating a difference in air pressure above and below the wing.
The engines provide the necessary thrust to move the airplane forward and maintain its speed.
The pilot controls the airplane's altitude and direction by adjusting the angle of the wings and the amount of thrust from the engines.
The airplane's weight and the air resistance it e...read more

Asked in Cognizant

Q. Given a problem scenario, what actions would you suggest taking?
The answer to the question depends on the specific problem scenario provided.
Analyze the problem scenario and identify the key issues
Consider the potential consequences of different actions
Evaluate the available resources and constraints
Propose a course of action that addresses the problem and maximizes positive outcomes
Provide a rationale for the chosen action

Asked in Flipkart

Q. You are getting requests for room allotment, each request will have the start time and end time of the request. Print the minimum number of rooms required to support all requests.
Calculate the minimum number of rooms needed for overlapping time requests.
Sort all requests by start time.
Use a priority queue to track end times of rooms in use.
For each request, check if a room is free (end time <= start time).
If a room is free, reuse it; otherwise, allocate a new room.
Example: Requests [(1, 4), (2, 3), (3, 5)] need 2 rooms.

Asked in Renault-Nissan

Q. What are your expectations and ideas about future generation vehicles?
I expect future generation vehicles to be more sustainable, efficient and autonomous.
Electric and hybrid vehicles will become more common
Self-driving technology will improve and become more accessible
Alternative fuel sources such as hydrogen and biofuels will be explored
Vehicles will be designed to be more aerodynamic and lightweight
Connected technology will allow for better traffic management and navigation

Asked in TCS

Q. What is oops What is dbms Types of computer network Tell me about yourself Tell me about project What is constructor What is switch Real life example of inheritance, data abstraction
Questions related to computer science and programming concepts.
OOPs stands for Object-Oriented Programming which is a programming paradigm based on the concept of objects.
DBMS stands for Database Management System which is a software system used to manage and organize data.
Types of computer networks include LAN, WAN, MAN, PAN, and CAN.
Tell about yourself by highlighting your education, skills, and work experience.
Explain your project by discussing its purpose, methodology, an...read more

Asked in Flipkart

Q. Demand of TVs next year? Specify one 'good' and one 'bad' approach
The demand for TVs next year is uncertain. A good approach would be to conduct market research and analyze trends, while a bad approach would be to rely solely on intuition.
Good approach: Conduct market research to understand consumer preferences and trends
Good approach: Analyze past sales data and industry forecasts to predict demand
Bad approach: Rely solely on intuition or gut feeling without any data or research
Bad approach: Overestimate demand without considering market f...read more
Asked in Fendahl Technology

Q. What is data-table? How you retrieved data? Where is was stored after retrieving?
A data-table is a way to organize data in rows and columns. Data can be retrieved using SQL queries or programming languages.
Data-table is a structured way to store data in rows and columns.
Data can be retrieved using SQL queries like SELECT * FROM table_name.
Data can also be retrieved using programming languages like Python or Java.
After retrieving data, it is typically stored in memory for processing or analysis.

Asked in Essex Lake Group

Q. “Our client is an SME owning a speciality exotic food restaurant in Mumbai. He wants to open up new restaurants in other metro cities. Suggest if it is a good idea or not. Also, come up with metrics used to arr...
read moreExpanding speciality exotic food restaurant chain to other metro cities - good idea or not?
Conduct market research to identify demand for exotic cuisine in other metro cities
Analyze competition and identify unique selling points for the restaurant
Evaluate financial feasibility and availability of resources for expansion
Consider potential challenges such as cultural differences and logistics
Develop a comprehensive business plan with clear goals and strategies

Asked in Annalect

Q. Why do you want to get into digital marketing and data analytics?
I am passionate about leveraging data to drive business decisions and digital marketing is the perfect platform to do so.
I have a strong interest in data analysis and its potential to drive business growth
Digital marketing is a constantly evolving field that offers exciting opportunities to apply data-driven insights
I believe that my skills in data analysis and marketing can be combined to create impactful campaigns
I am excited about the potential to use data to optimize mark...read more

Asked in Tata Motors

Q. What is the grade of coal in coal handling plant? Explain superfinishing processes like honing,lapping Differences between casting and forging Draw the processes in coal handling plant How coal burnt is turned...
read moreThe grade of coal in a coal handling plant is determined by its carbon content and calorific value.
Coal grades are classified based on their carbon content and calorific value, such as anthracite, bituminous, sub-bituminous, and lignite.
Superfinishing processes like honing and lapping are used to achieve high precision and smooth surface finishes on metal parts.
Casting involves pouring molten metal into a mold to create a desired shape, while forging involves shaping metal th...read more

Asked in Intel

Q. Linked list vs array Union vs array Prime no Explain memory segment How code executes [29/06, 20:53] Storage class [29/06, 20:53] Segmentation fault Dynamic memory allocation [29/06, 20:53] Calculator [29/06, 2...
read moreQuestions related to data structures, memory management, programming languages, and computer architecture.
Linked list is a dynamic data structure while array is a static data structure.
Union is a data type that allows storing different data types in the same memory location as opposed to array which stores elements of the same data type.
Prime numbers are numbers that are only divisible by 1 and themselves.
Memory segment refers to a portion of the computer's memory that is all...read more
Asked in Fendahl Technology

Q. Merge sort and selection difference. Explain merge sort working. Time complexities of some famous sorting algorithms.
Merge sort and selection sort are both sorting algorithms, but they differ in their approach and efficiency. Merge sort is a divide-and-conquer algorithm with a time complexity of O(n log n).
Merge sort divides the array into two halves, sorts each half recursively, and then merges the sorted halves back together.
Selection sort selects the smallest element from the unsorted portion of the array and swaps it with the first unsorted element.
Merge sort has a time complexity of O(...read more

Asked in Tata Motors

Q. What is the difference between a petrol engine and a diesel engine?
Petrol engines use spark ignition while diesel engines use compression ignition.
Petrol engines use a spark plug to ignite the fuel-air mixture, while diesel engines compress the air to a high temperature and pressure to ignite the fuel.
Petrol engines are generally more fuel-efficient at high speeds, while diesel engines are more fuel-efficient at low speeds.
Petrol engines are typically quieter and smoother than diesel engines.
Diesel engines produce more torque than petrol eng...read more

Asked in Adani Gas

Q. What is the difference between LPG (Liquefied Petroleum Gas) and CNG (Compressed Natural Gas)?
LPG is a mixture of propane and butane, while CNG is mainly composed of methane.
LPG is stored in liquid form under pressure, while CNG is stored in gaseous form under high pressure.
LPG is heavier than air and settles at the bottom of a container, while CNG is lighter than air and disperses quickly.
LPG is commonly used in households for cooking and heating, while CNG is used as a fuel for vehicles.
LPG has a higher energy content per unit volume compared to CNG.

Asked in Caterpillar Inc

Q. How can your BTech project be applied?
My BTP focused on developing a machine learning algorithm for predicting stock prices.
The algorithm can be used by financial institutions for making investment decisions.
It can also be used by individual investors for making informed decisions.
The algorithm can be further improved and applied to other financial markets.
The project can be presented at conferences and published in academic journals.
The skills and knowledge gained during the project can be applied to other data-...read more
Interview Questions of Similar Designations
Interview Experiences of Popular Companies
Top Interview Questions for Graduate Trainee Related Skills
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users