Walmart
30+ Bharti Airtel Interview Questions and Answers
Q1. Nth Fibonacci Number Problem Statement
Given an integer 'N', the task is to compute the N'th Fibonacci number using matrix exponentiation. Implement and return the Fibonacci value for the provided 'N'.
Note:
Si...read more
Q2. 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.
Q3. Deepest Leaves Sum Problem Statement
Given a binary tree of integers, your task is to calculate the sum of all the leaf nodes present at the deepest level of this binary tree. If there are no such nodes, output...read more
Q4. Similar Strings Problem Statement
Determine whether two given strings, A
and B
, both of length N
, are similar by returning a 1 if they are, otherwise return a 0.
Explanation:
String A
is similar to string B
if ...read more
Q5. Palindrome Permutation - Problem Statement
Determine if a permutation of a given string S
can form a palindrome.
Example:
Input:
string S = "aab"
Output:
"True"
Explanation:
The permutation "aba" of the string ...read more
Q6. Word Presence in Sentence
Determine if a given word 'W' is present in the sentence 'S' as a complete word. The word should not merely be a substring of another word.
Input:
The first line contains an integer 'T...read more
Q7. Remove Consecutive Duplicates Problem Statement
Given a string str
of size N
, your task is to recursively remove consecutive duplicates from this string.
Input:
T (number of test cases)
N (length of the string f...read more
Q8. 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.
Q9. Maximum Frequency Number Problem Statement
Given an array of integers with numbers in random order, write a program to find and return the number which appears the most frequently in the array.
If multiple elem...read more
Q10. Ways To Make Coin Change
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more
Q11. Duplicate Integer in Array
Given an array ARR
of size N
, containing each number between 1 and N-1
at least once, identify the single integer that appears twice.
Input:
The first line contains an integer, 'T', r...read more
Q12. Sliding Window Maximum Problem Statement
You are given an array/list of integers with length 'N'. A sliding window of size 'K' moves from the start to the end of the array. For each of the 'N'-'K'+1 possible wi...read more
Q13. Maximum Number With Single Swap
You are given an array of N elements that represent the digits of a number. You can perform one swap operation to exchange the values at any two indices. Your task is to determin...read more
Q14. Maximum Depth of a Binary Tree Problem Statement
Given the root node of a binary tree with N
nodes, where each node contains integer values, determine the maximum depth of the tree. The depth is defined as the ...read more
Q15. Validate Binary Search Tree (BST)
You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).
BST Definition:
A Binary Search Tree (BST)...read more
Q16. Next Smaller Element Problem Statement
You are provided with an array of integers ARR
of length N
. Your task is to determine the next smaller element for each array element.
Explanation:
The Next Smaller Elemen...read more
Q17. Equilibrium Index Problem Statement
Given an array Arr
consisting of N integers, your task is to find the equilibrium index of the array.
An index is considered as an equilibrium index if the sum of elements of...read more
Q18. String Transformation Problem
Given a string (STR
) of length N
, you are tasked to create a new string through the following method:
Select the smallest character from the first K
characters of STR
, remove it fr...read more
Q19. Josephus Problem Statement
Consider 'N' individuals standing in a circle, numbered consecutively from 1 to N, in a clockwise direction. Initially, the person at position 1 starts counting and will skip K-1 pers...read more
Q20. Graph Coloring Problem
You are given a graph with 'N' vertices numbered from '1' to 'N' and 'M' edges. Your task is to color this graph using two colors, such as blue and red, in a way that no two adjacent vert...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
Q21. 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
Q22. 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.
Q23. 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
Q24. 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
Q25. 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;
Q26. 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.
Q27. 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
Q28. Design a whole application in fiori
Q29. 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
Q30. 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
Q31. 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 Bharti Airtel
Interview Process at Bharti Airtel
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month