Add office photos
Engaged Employer

Brane Enterprises

2.2
based on 648 Reviews
Filter interviews by

HKM Public School Interview Questions and Answers

Updated 29 Nov 2024
Popular Designations

Q1. Explain the difference client side routing server side routing

Ans.

Client side routing is handled by the browser, while server side routing is handled by the server.

  • Client side routing is faster as it does not require a server request for each page change.

  • Server side routing involves the server processing each request and returning the appropriate page.

  • Client side routing is commonly used in single page applications (SPAs) with frameworks like React or Angular.

  • Server side routing is used in traditional web applications where each page is a s...read more

Add your answer

Q2. Time Complexity of all sorting algorithms

Ans.

Sorting algorithms have different time complexities.

  • Time complexity refers to the amount of time it takes for an algorithm to run as the input size increases.

  • Some common sorting algorithms and their time complexities are: Bubble Sort (O(n^2)), Insertion Sort (O(n^2)), Selection Sort (O(n^2)), Merge Sort (O(n log n)), Quick Sort (O(n log n)), Heap Sort (O(n log n)).

  • The time complexity of an algorithm helps in understanding its efficiency and scalability.

  • Different sorting algor...read more

Add your answer

Q3. Print bottom view of binary tree

Ans.

Print the bottom view of a binary tree

  • Use a map to store the horizontal distance and node value at each level

  • Perform a level order traversal of the binary tree

  • Update the map with the node value at each horizontal distance

  • Print the node values in the map for the bottom view

Add your answer

Q4. Longest consecutive sequence

Ans.

Find the length of the longest consecutive sequence in an array of strings.

  • Convert the array of strings to an array of integers.

  • Sort the array in ascending order.

  • Iterate through the sorted array and keep track of the longest consecutive sequence.

  • Return the length of the longest consecutive sequence.

Add your answer
Discover HKM Public School interview dos and don'ts from real experiences

Q5. Trim a bst in leet code

Ans.

Trim a binary search tree by removing nodes outside a given range.

  • Start by checking if the root node is within the given range.

  • If the root node is outside the range, trim it by recursively trimming its left or right subtree.

  • If the root node is within the range, recursively trim its left and right subtrees.

Add your answer

Q6. Search in rotated sorted array

Ans.

Search for a target element in a rotated sorted array.

  • Use binary search to find the pivot point where the array is rotated.

  • Divide the array into two sorted subarrays based on the pivot point.

  • Perform binary search on the appropriate subarray to find the target element.

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

Interview Process at HKM Public School

based on 7 interviews in the last 1 year
2 Interview rounds
Coding Test Round
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

4.4
 • 88 Interview Questions
3.8
 • 78 Interview Questions
3.4
 • 21 Interview Questions
4.2
 • 17 Interview Questions
3.5
 • 12 Interview Questions
4.6
 • 11 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
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