Brane Enterprises
HKM Public School Interview Questions and Answers
Q1. Explain the difference client side routing server side routing
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
Q2. Time Complexity of all sorting algorithms
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
Q3. Print bottom view of binary tree
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
Q4. Longest consecutive sequence
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.
Q5. Trim a bst in leet code
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.
Q6. Search in rotated sorted array
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.
Interview Process at HKM Public School
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month