Add office photos
Employer?
Claim Account for FREE

Walmart

3.9
based on 2.3k Reviews
Filter interviews by

300+ Interview Questions and Answers

Updated 10 Dec 2024
Popular Designations
Q1. Maximum Frequency Number

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

View 6 more answers
Q2. Nth Fibonacci Number

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
View 5 more answers
Q3. Sum of Digits

Ninja is given an integer ‘N’. One day Ninja decides to do the sum of all digits and replace the ‘N’ with the sum of digits until it becomes less than 10. Ninja wants to find what will be the value...read more

View 3 more answers
Q4. Find all anagrams

You have been given a string STR and a non-empty string PTR. Your task is to find all the starting indices of PTR’s anagram in STR.

An anagram of a string is another string which contains the s...read more

View 2 more answers
Discover null interview dos and don'ts from real experiences
Q5. Encode the Message

You have been given a text message. You have to return the Run-length Encoding of the given message.

Run-length encoding is a fast and simple method of encoding strings. The basic idea is to r...read more

View 2 more answers
Q6. Minimum Cost To Buy Oranges

You are given a bag of size 'W' kg and provided with the costs of packets with different weights of oranges as a list/array with the name 'cost'. Every i-th position in the cost denot...read more

View 5 more answers
Are these interview questions helpful?

Q7. What would be the ideal data structure to represent people and friend relations in facebook

Ans.

Graph

  • Use a graph data structure to represent people as nodes and friend relations as edges

  • Each person can be represented as a node with their unique identifier

  • Friend relations can be represented as directed edges between nodes

  • This allows for efficient traversal and retrieval of friend connections

View 2 more answers
Q8. Make all elements of the array distinct.

You have been given an array/list ‘ARR’ of integers consisting of ‘N’ integers. In one operation you can increase an element by 1. Your task is to return the minimum numb...read more

View 3 more answers
Share interview questions and help millions of jobseekers 🌟
Q9. Consecutive elements

You are given an array arr of N non-negative integers, you need to return true if the array elements consist of consecutive numbers otherwise return false.

For Example: If the given array is...read more

View 6 more answers
Q10. Ways To Make Coin Change

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

View 4 more answers
Q11. NINJA’S PARENTHESES

One day Ninja goes to play some intellectual games. There was a game where Ninja is given a string of balanced parentheses 'STR' and he has to calculate the score of that using the given rule...read more

View 3 more answers
Q12. Distinct Characters

Given a string “STR”, you need to return all the possible non-empty subsequences with distinct characters. You can return the strings in any order.

Note:
If the same string can be generated m...read more
View 2 more answers
Q13. Puzzle

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

Add your answer
Q14. Deepest Leaves Sum

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

View 3 more answers
Q15. Create a binary tree from postorder and preorder traversal

You are given the ‘POSTORDER’ and ‘PREORDER’ traversals of a binary tree. The binary tree consists of ‘N’ nodes where each node represents a distinct po...read more

View 3 more answers
Q16. Similar Strings

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
View 3 more answers
Q17. Data Structure Supporting Insert Delete And GetRandom

Design and implement a data structure which supports the following operations:

insert(X): Inserts an element X in the data structure and returns true if the ...read more
View 3 more answers
Q18. Maximum Sum Subsequence

You are given an array “NUMS” consisting of N integers and an integer, K. Your task is to determine the maximum sum of an increasing subsequence of length K.

Note:
1. The array may contai...read more
View 3 more answers
Q19. Palindrome Permutation

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
View 2 more answers
Q20. Maximum In Sliding Windows Of Size K

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

View 3 more answers
Q21. Maximum Number

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

View 2 more answers
Q22. K - Sum Path In A Binary Tree

You are given a binary tree in which each node contains an integer value and a number ‘K’. Your task is to print every path of the binary tree with the sum of nodes in the path as ‘...read more

View 2 more answers
Q23. Check if the Word is present in Sentence or not

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

View 2 more answers

Q24. Custom implementation of stack where there are two additional methods that return the min and max of the elements in the stack

Ans.

Custom stack with methods to return min and max elements

  • Implement a stack using an array or linked list

  • Track the minimum and maximum elements using additional variables

  • Update the minimum and maximum variables during push and pop operations

  • Implement methods to return the minimum and maximum elements

Add your answer
Q25. House Robber

Mr. X is a professional robber planning to rob houses along a street. Each house has a certain amount of money hidden. All houses along this street are arranged in a circle. That means the first hou...read more

View 2 more answers
Q26. LRU Cache Implementation

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, o...read more
View 3 more answers
Q27. Nth Fibonacci Number

Nth term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -

 F(n) = F(n-1) + F(n-2), Where, F(1) = F(2) = 1 

Provided N you have to find out the ...read more

View 4 more answers
Q28. Check Whether Binary tree Is Complete

You are given a binary tree. Your task is to check whether the given binary tree is a Complete Binary tree or not.

A Complete Binary tree is a binary tree whose every level,...read more

View 3 more answers
Q29. Maximum Depth Of A Binary Tree

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

View 2 more answers
Q30. Top View of the Binary Tree

You have been given a Binary Tree of integers. You are supposed to return the top view of the given binary tree.

Top view of the binary tree is the set of nodes which are visible when...read more

View 4 more answers
Q31. General Questions

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

Add your answer
Q32. Duplicate In Array

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

View 4 more answers
Q33. Minimum Jumps

Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

‘Arcade’ is a very famous mall in Berland. It has a very unique t...read more

View 5 more answers
Q34. Maximum length pair chain

You are given ‘N’ pairs of integers in which the first number is always smaller than the second number i.e in pair (a,b) -> a < b always. Now we define a pair chain as the continuous ar...read more

View 5 more answers
Q35. Intersection of Linked Lists

You are given two linked lists L1 and L2 which are sorted in ascending order. You have to make a linked list with the elements which are present in both the linked lists and are pres...read more

View 2 more answers
Q36. Minimum Numbers Required

You are given an array, 'ARR', consisting of ‘N’ integers. You are also given two other integers, ‘SUM’ and ‘MAXVAL’. The elements of this array follow a special property that the absolu...read more

View 2 more answers
Q37. Equilibrium Index

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

View 3 more answers
Q38. Minimum Cost To Connect Sticks

You are given an array/list ‘ARR’ of ‘N’ positive integers where each element describes the length of the stick. You have to connect all sticks into one. At a time, you can join an...read more

View 2 more answers

Q39. Given a tree and a node, print all ancestors of Node

Ans.

Given a tree and a node, print all ancestors of Node

  • Start from the given node and traverse up the tree

  • While traversing, keep track of the parent nodes

  • Print the parent nodes as you traverse up until reaching the root

View 1 answer
Q40. Validate BST

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

View 2 more answers
Q41. Pair Sum

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair shou...read more
View 4 more answers

Q42. Explain useState for managing state, useEffect for handling side effects, useMemo for performance optimization, and useCallback for memoizing functions. Understand how these hooks enhance functional components.

Ans.

Explanation of useState, useEffect, useMemo, and useCallback hooks in React functional components.

  • useState is used to manage state in functional components

  • useEffect is used for handling side effects like data fetching, subscriptions, etc.

  • useMemo is used for performance optimization by memoizing expensive calculations

  • useCallback is used for memoizing functions to prevent unnecessary re-renders

  • These hooks enhance functional components by providing state management, side effect ...read more

Add your answer
Q43. Remove Consecutive Duplicates

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
Add your answer
Q44. String Transformation

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

View 2 more answers

Q45. what will happen if I write without condition in for loop?

Ans.

The for loop will run indefinitely without any condition to terminate it.

  • The loop will continue executing until it is manually interrupted or the program crashes.

  • This can lead to a program becoming unresponsive or consuming excessive resources.

  • It is important to always include a condition in a for loop to control its execution.

View 2 more answers
Q46. Convert Sorted Array to BST

You have been given a sorted array of length ‘N’. You need to construct a balanced binary search tree from the array. If there can be more than one possible tree, then you can return ...read more

View 3 more answers
Q47. Bipartite Graph

Given a graph, check whether the graph is bipartite or not. Your function should return true if the given graph's vertices can be divided into two independent sets, ‘U’ and ‘V’ such that every ed...read more

View 2 more answers
Q48. Technical Question

How can you tune the hyper parameters of XGboost algorithm?

View 2 more answers
Q49. Kth largest element

Ninja loves playing with numbers. One day Alice gives him some numbers and asks him to find the Kth largest value among them.

Input Format:
The first line of input contains an integer ‘T,’ de...read more
View 3 more answers
Q50. General

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

Add your answer
Q51. Next Smaller Element

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

View 3 more answers

Q52. How to add and manipulate elements in arrays using JavaScript (e.g., inserting "watermelon" in the middle)?

Ans.

To add and manipulate elements in arrays using JavaScript, you can use array methods like splice() and slice().

  • Use the splice() method to insert elements into an array at a specific index. For example, arr.splice(index, 0, 'watermelon') will insert 'watermelon' at the specified index without removing any elements.

  • To manipulate elements in an array, you can use methods like splice() to remove elements or slice() to extract a portion of the array.

  • Remember that arrays in JavaScr...read more

Add your answer

Q53. 1. Design and code a scheduler for allocating meeting rooms for the given input of room counts and timestamps: Input : No of rooms : 2 Time and dutation: 12pm 30 min Output: yes. Everytime the code runs it shou...

read more
Ans.

Design and code a scheduler for allocating meeting rooms based on input of room counts and timestamps.

  • Create a table with columns for room number, start time, and end time

  • Use SQL queries to check for available slots and allocate rooms

  • Consider edge cases such as overlapping meetings and room availability

  • Use a loop to continuously check for available slots and allocate rooms

  • Implement error handling for invalid input

Add your answer

Q54. What are the different approach you use for data cleaning.

Ans.

Different approaches for data cleaning include removing duplicates, handling missing values, correcting inconsistent data, and standardizing formats.

  • Remove duplicates

  • Handle missing values

  • Correct inconsistent data

  • Standardize formats

  • Use statistical methods to identify outliers

  • Check for data accuracy and completeness

  • Normalize data

  • Transform data types

  • Apply data validation rules

Add your answer
Q55. Josephus

‘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

View 3 more answers

Q56. How can you tune the hyper parameters of XGboost,Random Forest,SVM algorithm?

Ans.

Hyperparameters of XGBoost, Random Forest, and SVM can be tuned using techniques like grid search, random search, and Bayesian optimization.

  • For XGBoost, important hyperparameters to tune include learning rate, maximum depth, and number of estimators.

  • For Random Forest, important hyperparameters to tune include number of trees, maximum depth, and minimum samples split.

  • For SVM, important hyperparameters to tune include kernel type, regularization parameter, and gamma value.

  • Grid ...read more

View 1 answer
Q57. SQL Question

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.

Add your answer
Q58. Technical Questions

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

Add your answer
Q59. Technical Question

How to fit a time series model? State all the steps you would follow.

Add your answer

Q60. Code to determine the median of datapoints present in two sorted arrays. Most efficient algo

Ans.

Code to find median of datapoints in two sorted arrays

  • Use binary search to find the median index

  • Divide the arrays into two halves based on the median index

  • Compare the middle elements of the two halves to determine the median

Add your answer
Q61. Technical Questions

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

Add your answer
Q62. Colour The Graph

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

Ans.

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

View 1 answer

Q63. Microservices and their communication patterns. How is it implemented in your project and why?

Ans.

Microservices are implemented using RESTful APIs and message brokers for asynchronous communication.

  • RESTful APIs are used for synchronous communication between microservices.

  • Message brokers like Kafka or RabbitMQ are used for asynchronous communication.

  • Microservices communicate with each other using HTTP requests and responses.

  • Each microservice has its own database and communicates with other microservices through APIs.

  • Microservices are loosely coupled and can be developed an...read more

Add your answer
Q64. Technical Questions

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

Add your answer

Q65. What do these hyper parameters in the above mentioned algorithms actually mean?

Ans.

Hyperparameters are settings that control the behavior of machine learning algorithms.

  • Hyperparameters are set before training the model.

  • They control the learning process and affect the model's performance.

  • Examples include learning rate, regularization strength, and number of hidden layers.

  • Optimizing hyperparameters is important for achieving better model accuracy.

Add your answer
Q66. Technical Question

What are outlier values and how do you treat them?

Add your answer

Q67. How to generate an unique id for a massive parallel system?

Ans.

An unique id for a massive parallel system can be generated using a combination of timestamp, machine id and a random number.

  • Use a timestamp to ensure uniqueness

  • Include a machine id to avoid collisions in a distributed system

  • Add a random number to further increase uniqueness

  • Consider using a UUID (Universally Unique Identifier) for simplicity

  • Ensure the id generation algorithm is thread-safe

Add your answer

Q68. Understand setting up a Redux store, connecting components, and managing actions and reducers. Be familiar with middleware like Redux Thunk or Redux Saga for handling asynchronous actions.

Ans.

Setting up Redux store, connecting components, managing actions and reducers, and using middleware like Redux Thunk or Redux Saga for handling asynchronous actions.

  • Setting up a Redux store involves creating a store with createStore() function from Redux, combining reducers with combineReducers(), and applying middleware like Redux Thunk or Redux Saga.

  • Connecting components to the Redux store can be done using the connect() function from react-redux library, which allows compon...read more

Add your answer

Q69. How you get your data in your organization

Ans.

Data is collected from various sources including databases, APIs, and user input.

  • We have access to multiple databases where we can extract relevant data

  • We use APIs to gather data from external sources such as social media platforms

  • Users can input data through forms or surveys

  • We also collect data through web scraping techniques

Add your answer

Q70. Sequence of Execution of SQL codes. Select - Where-from-Having- order by etc

Ans.

The sequence of execution of SQL codes is Select-From-Where-Group By-Having-Order By.

  • Select: choose the columns to display

  • From: specify the table(s) to retrieve data from

  • Where: filter the data based on conditions

  • Group By: group the data based on a column

  • Having: filter the grouped data based on conditions

  • Order By: sort the data based on a column

View 1 answer

Q71. Write code to describe database and Columns from a particular table

Ans.

Code to describe database and columns from a table

  • Use SQL SELECT statement to retrieve column names and data types

  • Use DESC command to get table structure

  • Use INFORMATION_SCHEMA.COLUMNS to get detailed information about columns

  • Use SHOW CREATE TABLE to get table creation statement

Add your answer

Q72. 1. Create a program for a Race, where 5 people will start the race at the same time and return who finishes first. using multithreading.

Ans.

A program to simulate a race with 5 people using multithreading and determine the winner.

  • Create a class for the race participants

  • Implement the Runnable interface for each participant

  • Use a thread pool to manage the threads

  • Start all threads simultaneously

  • Wait for all threads to finish

  • Determine the winner based on the finishing time

View 1 answer

Q73. Define Excel Functions Sum , Sum if , Count , CountA , Count Blanks

Ans.

Excel functions are pre-built formulas that perform calculations or manipulate data in a spreadsheet.

  • Sum: adds up a range of numbers

  • Sum if: adds up a range of numbers based on a specified condition

  • Count: counts the number of cells in a range that contain numbers

  • CountA: counts the number of cells in a range that are not empty

  • Count Blanks: counts the number of empty cells in a range

Add your answer

Q74. Which design pattern you follow and why? Show some example.

Ans.

I follow the MVC design pattern as it separates concerns and promotes code reusability.

  • MVC separates the application into Model, View, and Controller components.

  • Model represents the data and business logic.

  • View represents the user interface.

  • Controller handles user input and updates the model and view accordingly.

  • MVC promotes code reusability and maintainability.

  • Example: Ruby on Rails framework follows MVC pattern.

Add your answer

Q75. How to fit a time series model? State all the steps you would follow.

Ans.

Steps to fit a time series model

  • Identify the time series pattern

  • Choose a suitable model

  • Split data into training and testing sets

  • Fit the model to the training data

  • Evaluate model performance on testing data

  • Refine the model if necessary

  • Forecast future values using the model

View 1 answer
Q76. OS Question

Why Java is platform independent and JVM platform dependent?

Add your answer

Q77. Difference between CSV file and Excel file

Ans.

CSV files are plain text files that store tabular data, while Excel files are binary files that can contain multiple sheets and complex formatting.

  • CSV files are simpler and more lightweight compared to Excel files.

  • CSV files can be easily opened and edited using a text editor, while Excel files require specific software like Microsoft Excel.

  • CSV files do not support formulas, macros, or formatting options like colors and fonts, while Excel files do.

  • CSV files have a smaller file...read more

View 1 answer

Q78. How much amount of data you Handel till now.

Ans.

I have handled large amounts of data in my previous roles.

  • I have experience handling terabytes of data in my previous role as a data analyst at XYZ company.

  • I have worked with data from various sources such as databases, spreadsheets, and APIs.

  • I have also used tools like SQL, Python, and Excel to manipulate and analyze data.

  • I am comfortable working with both structured and unstructured data.

  • I have experience cleaning and transforming data to make it usable for analysis.

Add your answer

Q79. How do you ensure a payment does get credited to wrong employee account?

Ans.

We implement multiple checks and balances to ensure payments are credited to the correct employee account.

  • We verify the employee's account number and name before processing any payment.

  • We implement a two-step verification process to ensure accuracy.

  • We conduct regular audits to ensure all payments are correctly credited.

  • We have a dedicated team to handle any payment discrepancies or errors.

  • We provide training to employees on how to verify and confirm payment details.

  • We use adv...read more

Add your answer

Q80. You have 3 friends. The probability of each telling truth is 2/3. All saying it's raining. What's the probability that it's actually raining

Ans.

Probability of raining given 3 friends with 2/3 truth probability saying it's raining.

  • Use Bayes' theorem to calculate the probability

  • P(Raining | All Friends Saying It's Raining) = P(All Friends Saying It's Raining | Raining) * P(Raining) / P(All Friends Saying It's Raining)

  • P(All Friends Saying It's Raining | Raining) = 1

  • P(Raining) = Prior probability of raining

  • P(All Friends Saying It's Raining) = Probability of all friends saying it's raining

Add your answer

Q81. Difference between having and where clause

Ans.

HAVING is used with GROUP BY to filter the results after grouping. WHERE is used to filter the results before grouping.

  • HAVING is used with GROUP BY clause while WHERE is used with SELECT clause.

  • HAVING is used to filter the results of aggregate functions while WHERE is used to filter individual rows.

  • HAVING is used to filter the results after grouping while WHERE is used to filter the results before grouping.

  • HAVING can only be used with aggregate functions while WHERE can be us...read more

Add your answer

Q82. Write query to find the top five employee salary?

Ans.

Query to find the top five employee salaries

  • Use the SELECT statement to retrieve the employee salaries

  • Order the results in descending order using the ORDER BY clause

  • Limit the results to the top five using the LIMIT clause

View 2 more answers

Q83. What is the use if store procedure ?

Ans.

Stored procedures are precompiled SQL statements that can be reused and executed multiple times.

  • Stored procedures improve performance by reducing network traffic and improving security.

  • They can be used to encapsulate business logic and provide a consistent interface to the database.

  • Stored procedures can also be used to simplify complex queries and transactions.

  • Examples include procedures for inserting, updating, and deleting data, as well as generating reports and performing ...read more

Add your answer

Q84. Mocking components in Jest, including handling props and named exports

Ans.

Mocking components in Jest for testing with props and named exports

  • Use jest.mock() to mock components and their exports

  • For handling props, use jest.fn() to create mock functions and pass them as props to the component being tested

  • For named exports, use jest.mock() with a second argument to specify the module's exports

Add your answer

Q85. Design a Garbage collector similar to Java Garbage Collector with minimum configurations.

Ans.

Design a Java-like Garbage Collector with minimal configurations.

  • Choose a garbage collection algorithm (e.g. mark-and-sweep, copying, generational)

  • Determine the heap size and divide it into regions (e.g. young, old, permanent)

  • Implement a root set to keep track of live objects

  • Set thresholds for garbage collection (e.g. occupancy, time)

  • Implement the garbage collection algorithm and test for memory leaks

Add your answer

Q86. 7. Which data structure you will use to search a lot of data.

Ans.

I would use a hash table for efficient searching of a lot of data.

  • Hash tables provide constant time complexity for search operations.

  • They use a hash function to map keys to array indices, allowing for quick retrieval of data.

  • Examples of hash table implementations include dictionaries in Python and HashMaps in Java.

Add your answer

Q87. How instagram application works. If someone tagged you how you will get notification and how those reels are showing in your profile page...etc.

Ans.

Instagram uses a notification system to alert users when they are tagged and displays reels on the profile page based on user preferences and algorithms.

  • Instagram uses a push notification system to alert users when they are tagged in a post or story.

  • Reels are displayed on the profile page based on user engagement, preferences, and algorithms.

  • The Explore page also suggests reels to users based on their interests and interactions on the platform.

Add your answer

Q88. what is memoization, also write polyfill of memoize

Ans.

Memoization is a technique used in programming to store the results of expensive function calls and return the cached result when the same inputs occur again.

  • Memoization helps improve the performance of a function by caching its results.

  • It is commonly used in dynamic programming to optimize recursive algorithms.

  • Example: Memoizing a Fibonacci function to avoid redundant calculations.

Add your answer
Q89. Technical Question

Explain the hyper parameters in XGboost Algorithm .

View 2 more answers
Q90. OS Questions

Explain deadlock and its conditions.
What is synchronization?
What is paging?
Semaphore vs Mutex

Ans.

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

Add your answer
Q91. Technical Question

Difference between Ridge and LASSO .

Add your answer

Q92. 3. How request flows in Spring boot MVC. 4. how many ways to instantiate a bean? 5. what will you do in case of a Java out-of-memory exception?

Ans.

Request flows in Spring Boot MVC, ways to instantiate a bean, and handling Java out-of-memory exception.

  • Request flows in Spring Boot MVC: DispatcherServlet receives HTTP request, HandlerMapping maps request to appropriate controller, Controller processes request and returns response.

  • Ways to instantiate a bean: Constructor injection, setter injection, and using the @Bean annotation.

  • Handling Java out-of-memory exception: Analyze memory usage, increase heap size, optimize code, ...read more

Add your answer
Q93. OOPS Question

What is Data Abstraction and how to achive it ?

Add your answer

Q94. A wooden cube of 5 cm each side. Painted. Now cut to smaller cube of 1cm side each. How many smaller cubes have all sides paintee, 4 sides paintee, 3 sides painted etc.

Ans.

A 5cm wooden cube is cut into smaller 1cm cubes. Determine the number of cubes with different numbers of painted sides.

  • The original cube has 125 smaller cubes (5x5x5)

  • Each smaller cube has 6 faces, so there are 750 faces in total

  • The cubes on the edges have 3 painted sides, the ones on the corners have 3 painted sides, and the rest have 2 painted sides

  • There are 8 cubes on the corners, 12 on the edges, and 105 in the middle

  • There are 8 cubes with 3 painted sides, 36 with 2 painte...read more

Add your answer
Q95. Technical Question

RNN,CNN and difference between these two.

Add your answer

Q96. Use and purpose of Math.floor() in JavaScript.

Ans.

Math.floor() is a method in JavaScript that rounds a number down to the nearest integer.

  • Math.floor() returns the largest integer less than or equal to a given number.

  • It is commonly used to convert a floating-point number to an integer.

  • Example: Math.floor(3.9) returns 3.

Add your answer
Q97. OOPS Question

Static and Dynamic Polymorphism

Add your answer

Q98. what is Promise also write polyfill for Promise

Ans.

A Promise is an object representing the eventual completion or failure of an asynchronous operation.

  • A Promise is used to handle asynchronous operations in JavaScript.

  • It represents a value that may be available now, or in the future.

  • A polyfill for Promise can be implemented using the setTimeout function to simulate asynchronous behavior.

Add your answer

Q99. Word break String to Integer System design e commerce app

Ans.

The interviewee was asked about word break, string to integer, and system design for an e-commerce app.

  • Word break: Given a string and a dictionary of words, determine if the string can be segmented into a space-separated sequence of dictionary words.

  • String to integer: Convert a string to an integer. Handle negative numbers and invalid inputs.

  • System design e-commerce app: Design an e-commerce app with features like product listing, search, cart, checkout, payment, and order tr...read more

Add your answer

Q100. Difference between Ridge and LASSO and their geometric interpretation.

Ans.

Ridge and LASSO are regularization techniques used in linear regression to prevent overfitting.

  • Ridge adds a penalty term to the sum of squared errors, which shrinks the coefficients towards zero but doesn't set them exactly to zero.

  • LASSO adds a penalty term to the absolute value of the coefficients, which can set some of them exactly to zero.

  • The geometric interpretation of Ridge is that it adds a constraint to the size of the coefficients, which shrinks them towards the origi...read more

Add your answer
1
2
3
4
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 198 interviews in the last 1 year
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.6
 • 377 Interview Questions
4.2
 • 309 Interview Questions
3.8
 • 209 Interview Questions
3.9
 • 153 Interview Questions
4.3
 • 136 Interview Questions
4.0
 • 133 Interview Questions
View all
Top Walmart Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter