Add office photos
Employer?
Claim Account for FREE

Walmart Labs

3.8
based on 96 Reviews
Filter interviews by

Patel Infrastructure Interview Questions and Answers

Updated 27 Apr 2024
Popular Designations

Q1. how to find number of paths in tree such that sum of the values in those nodes will be equal to count?(hint:recursion)

Ans.

Finding number of paths in tree with sum of node values equal to count using recursion.

  • Use recursion to traverse the tree and keep track of the sum of node values.

  • At each node, check if the current sum equals the desired count.

  • If yes, increment the path count.

  • Recursively traverse the left and right subtrees.

  • Return the total path count.

  • Example: Given a tree with values [10, 5, -3, 3, 2, null, 11], count the number of paths with sum equal to 8.

  • The answer would be 3, as there ar...read more

Add your answer

Q2. There is 3*3 RUBIX cube, Can you find data structure for solving rubix cube

Ans.

A graph data structure can be used to solve a Rubix cube.

  • Each cubelet can be represented as a node in the graph.

  • Edges can be added between nodes to represent possible moves.

  • A search algorithm like BFS or DFS can be used to find the solution.

View 1 answer

Q3. If Redo and Undo operations have to perform, which datastructure can we use?(stack)

Ans.

Stack data structure is suitable for implementing Redo and Undo operations.

  • Stack follows Last-In-First-Out (LIFO) order, which is ideal for undoing and redoing operations.

  • When an operation is performed, it can be pushed onto the stack for undoing later.

  • To redo an operation, the previously undone operations can be popped from the stack.

  • Stack provides efficient insertion and deletion at one end, making it suitable for undo and redo functionality.

Add your answer

Q4. Given array of weights(infinite supply), can you find that given weight can be formed by using those set of weights?(dynamic programming,geeksforgeeks)

Ans.

Dynamic programming solution to find if a given weight can be formed using an array of weights

  • Create a boolean array of size (given weight + 1) to store if a weight can be formed or not

  • Initialize the first element of the boolean array to true

  • Iterate through the array of weights and for each weight, iterate through the boolean array and mark true for all weights that can be formed using the current weight

  • Return the value at the index of the given weight in the boolean array

Add your answer
Discover Patel Infrastructure interview dos and don'ts from real experiences

Q5. Can you explain me about Router ?

Ans.

A router is a networking device that forwards data packets between computer networks.

  • Routers operate at the network layer of the OSI model.

  • They use routing tables to determine the best path for data packets to travel.

  • Routers can connect multiple networks together, such as a home network to the internet.

  • They can also provide security by blocking unauthorized access to a network.

  • Examples of routers include Cisco, Netgear, and TP-Link.

Add your answer

Q6. one simple puzzle?(cant explain through words)

Ans.

Arrange 8 queens on a chessboard so that no two queens threaten each other.

  • Each queen must be placed in a different row and column

  • No two queens can be in the same diagonal

  • There are 92 possible solutions

  • One solution is: (0, 4), (1, 2), (2, 7), (3, 3), (4, 6), (5, 1), (6, 5), (7, 0)

Add your answer

Q7. Explain about how internet works?

Ans.

The internet is a global network of interconnected devices that communicate with each other using standardized protocols.

  • The internet is made up of millions of interconnected devices such as computers, servers, routers, and switches.

  • Data is transmitted across the internet using standardized protocols such as TCP/IP.

  • The internet is accessed through Internet Service Providers (ISPs) who provide users with a connection to the internet.

  • Websites are hosted on servers and accessed ...read more

Add your answer

Q8. Find the subarray with given sum.

Ans.

Find subarray with given sum in an array of integers.

  • Use a sliding window approach to find subarray with sum equal to given sum.

  • Keep track of current sum and adjust window size accordingly.

  • Return the indices of the subarray if found, else return an empty array.

Add your answer

Q9. Reverse a linkedlist, sorting algorithms

Ans.

Reverse a linked list and discuss sorting algorithms.

  • To reverse a linked list, you can use a three-pointer approach.

  • Sorting algorithms include bubble sort, insertion sort, merge sort, quicksort, etc.

  • Discuss the time complexity and space complexity of each sorting algorithm.

  • Provide examples of how each sorting algorithm works.

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

Interview Process at Patel Infrastructure

based on 7 interviews
3 Interview rounds
Coding Test Round - 1
Coding Test Round - 2
One-on-one Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

3.7
 • 44 Interview Questions
3.9
 • 26 Interview Questions
4.1
 • 25 Interview Questions
4.9
 • 21 Interview Questions
3.5
 • 10 Interview Questions
3.2
 • 10 Interview Questions
View all
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

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