Walmart
40+ Transport Solutions India Interview Questions and Answers
You are given an integer ‘N’, your task is to find and return the N’th Fibonacci number using matrix exponentiation.
Since the answer can be very large, return the answer modulo 10^9 +7.
Fib...read more
You have been given a binary tree of integers. Your task is to calculate the sum of all the leaf nodes which are present at the deepest level of this binary tree. If there are no such nodes, p...read more
You are given two strings, ‘A’ and ‘B’ each of length ‘N’. Your task is to print 1 if ‘A’ is similar to ‘B’.
Note :
String ‘A’ is said to be similar to string ‘B’ if and only if 1. ‘A’ is equal t...read more
You are given a string 'S', check if there exists any permutation of the given string that is a palindrome.
Note :
1. A palindrome is a word or phrase that reads the same from forward and ...read more
You have been given a sentence ‘S’ in the form of a string and a word ‘W’, you need to find whether the word is present in the given sentence or not. The word must...read more
1. Draw a BST with randomly selected 12 values of your choice. Asked what’s the approach I am following while creating it. Write Code and Explain all the traversals for that particular tree. (i...read more
You are given a string ‘str’ of size ‘N’. Your task is to remove consecutive duplicates from this string recursively.
For example:
If the input string is ‘str’ = ”aazbbby”, then you...read more
1. To write a function that will swap two numbers (2 or 3 fixed), i.e. if I got 2, I need to return 3 and vice versa.
2. Write SQL query for a table given by him.
3. Two classes are there Base and Derived ...read more
Q9. Working code with edge cases.
Working code with edge cases is code that has been tested with extreme inputs to ensure it functions correctly.
Edge cases are inputs that are unlikely to occur but can cause unexpected behavior if not handled properly.
Examples of edge cases include empty inputs, null values, and inputs at the limits of the data type's range.
Working code with edge cases should be thoroughly tested to ensure it functions correctly in all scenarios.
Q10. Write a for loop in cpp to print n natural numbers without using semicolon (;)
Use recursion to print n natural numbers in C++ without semicolon.
Define a function to print natural numbers recursively.
Call the function inside main function with n as argument.
Base case: if n is less than 1, return.
Print n and call the function with n-1 as argument.
Ninja is given an array of integers that contain numbers in random order. He needs to write a program to find and return the number which occurs the maximum times in the given input. He ...read more
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more
You are trying to cook an egg for exactly fifteen minutes, but instead of a timer, you are given two ropes which burn for exactly 1 hour each. The ropes, however, are of uneven densities – i e , half the ...read more
You are given an array ‘ARR’ of size ‘N’ containing each number between 1 and ‘N’ - 1 at least once. There is a single integer value that is present in the array twice. Your task is to find th...read more
Given an array/list of integers of length ‘N’, there is a sliding window of size ‘K’ which moves from the beginning of the array, to the very end. You can only see the ‘K’ nu...read more
You are given an array of N elements. This array represents the digits of a number. In an operation, you can swap the value at any two indices. Your task is to find the maximum number by using ope...read more
You are given the root node of a binary tree with N nodes, whose nodes have integer values. Your task is to find the maximum depth of the given Binary tree.
Depth of a binary tree...read more
You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.
A binary search tree (BST) is a binary tree data ...read more
You are given an array 'ARR' of integers of length N. Your task is to find the next smaller element for each of the array elements.
Next Smaller Element for an array element is the first ele...read more
You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.
An index is considered as an equilibrium index if the sum of elements of the array to t...read more
Given a string (STR) of length N, you have to create a new string by performing the following operation:
Take the smallest character from the first 'K' characters of STR, remove it from STR...read more
‘N’ people are standing in a circle numbered from ‘1’ to ‘N’ in clockwise order. First, the person numbered 1 will proceed in a clockwise direction and will skip K-1 persons including itself and will ki...read more
You are given a graph with 'N' vertices numbered from '1' to 'N' and 'M' edges. You have to colour this graph in two different colours, say blue and red such that no two vertices connected by an...read more
The problem is to color a graph with two colors such that no two connected vertices have the same color.
Use a graph coloring algorithm such as Depth First Search (DFS) or Breadth First Search (BFS).
Start with an arbitrary vertex and color it with one color (e.g., blue).
Color all its adjacent vertices with the other color (e.g., red).
Continue this process for all connected components of the graph.
If at any point, you encounter two adjacent vertices with the same color, it is n...read more
Write a SQL query to print the highest salary of each department in a employee table that contains employee details - department to which employee belong, salary of employee.
1. Whats polymorphism - compile time and run time.
2. What are exceptions in Java - Since my primary language was C++, I explained exception in C++ only.
3. What are collections in Java- list, ...read more
Exception handling in C++ in detail.
What do mean by OOPS.
What is inheritance.
Create a database to store the information of employees and their salaries (just explain)
What are insertion, delet...read more
What is a basic form of GRANT statement?
Calculate the result of the following prefix expression: +,-,*,8,4,/,6,2,5
If a new node is added into a red-black tree, which statements are true ?
What...read more
Explain deadlock and its conditions.
What is synchronization?
What is paging?
Semaphore vs Mutex
Deadlock is a situation where two or more processes are unable to proceed because each is waiting for the other to release a resource.
Deadlock occurs when two or more processes are stuck in a circular wait, where each process is waiting for a resource held by another process.
The four necessary conditions for deadlock are mutual exclusion, hold and wait, no preemption, and circular wait.
Synchronization refers to the coordination of multiple processes or threads to ensure their...read more
Arrange the following time complexities from high to low: n^2, n^n, logn, nlogn, n
Q30. System Design round - Designing solution
Design a scalable and fault-tolerant system for a social media platform
Use microservices architecture to break down the system into smaller, independent services
Implement load balancing to distribute traffic evenly across servers
Utilize caching mechanisms to improve performance and reduce database load
Implement redundancy and failover mechanisms to ensure high availability
Use monitoring and alerting tools to detect and respond to issues proactively
Q31. How can improve the sales and marketing what is your projection What is the reporting procedure
To improve sales and marketing, I would focus on creating targeted campaigns and utilizing data analytics to track performance.
Conduct market research to identify target audience and their needs
Develop targeted campaigns with clear messaging and call-to-action
Utilize data analytics to track campaign performance and make adjustments as needed
Collaborate with sales team to ensure alignment and provide necessary support
Regularly review and update marketing strategies based on ma...read more
Q32. Design calculator app
Design a calculator app with basic arithmetic operations.
Include basic arithmetic operations like addition, subtraction, multiplication, and division.
Design a user-friendly interface with large buttons for numbers and operations.
Allow users to input numbers using both keypad and touch screen.
Implement error handling for division by zero and other invalid inputs.
Q33. what do think about women's education?
Women's education is crucial for the development of society and the empowerment of women.
Women's education leads to better health outcomes for themselves and their families.
Educated women are more likely to participate in the workforce and contribute to the economy.
Education can help women gain the skills and knowledge needed to advocate for their rights and challenge gender inequality.
Investing in women's education has been shown to have a positive impact on reducing poverty...read more
Q34. design url shortener
Design a URL shortener system
Generate a unique short code for each URL
Store the mapping of short code to original URL in a database
Redirect users from short URL to original URL
Consider scalability and performance
Implement analytics to track usage statistics
Q35. Sql queries to find 2 max salary
Use SQL query to find the top 2 highest salaries in a table.
Use the ORDER BY clause to sort the salaries in descending order.
Use the LIMIT clause to limit the results to 2.
Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 2;
Q36. Logical coding to write power base 10
To write power base 10 in logical coding, you can simply use the exponentiation operator or function.
Use the exponentiation operator '**' in Python to calculate power base 10.
In JavaScript, you can use the Math.pow() function to calculate power base 10.
In Java, you can use the Math.pow() function as well to calculate power base 10.
Q37. Design a whole application in fiori
Q38. how do you problem solve?
I approach problem solving by breaking down the issue, analyzing possible solutions, and implementing the best course of action.
Identify the problem and gather relevant information
Brainstorm potential solutions
Evaluate each solution based on feasibility and effectiveness
Implement the chosen solution and monitor outcomes
Adjust the approach if needed
Q39. Design Walmart search API
Design Walmart search API
Define search parameters (e.g. product name, category, price range)
Implement search algorithm (e.g. keyword matching, relevance ranking)
Integrate with Walmart's product database
Provide filtering and sorting options
Ensure scalability and performance
Include error handling and logging
Q40. Explain Inheritance in C++
Inheritance in C++ allows a class to inherit properties and behavior from another class.
Inheritance allows for code reusability by creating a new class based on an existing class.
Derived class inherits attributes and methods from the base class.
Types of inheritance include single, multiple, multilevel, and hierarchical.
Example: class Animal is a base class, class Dog is a derived class inheriting from Animal.
Top HR Questions asked in Transport Solutions India
Interview Process at Transport Solutions India
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month