Filter interviews by
Implement 3 stacks in a single array efficiently
Divide the array into 3 equal parts
Use pointers to keep track of top of each stack
Implement push and pop operations for each stack
Handle stack overflow and underflow cases
Find the maximum rectangle (in terms of area) under a histogram in linear time
Use a stack to keep track of the bars in the histogram
For each bar, calculate the area of the rectangle it can form
Pop the bars from the stack until a smaller bar is encountered
Keep track of the maximum area seen so far
Return the maximum area
Program to find depth of binary search tree without recursion
Use a stack to keep track of nodes and their depths
Iteratively traverse the tree and update the maximum depth
Return the maximum depth once traversal is complete
Use a hash map to index anagrams by sorting characters as keys.
Create a hash map where the key is the sorted string of characters.
For example, 'top' and 'pot' both map to 'opt'.
Store all anagrams in a list associated with the sorted key.
When querying, sort the input word and retrieve the list from the map.
To find a given integer in a circularly sorted array of integers, use binary search with slight modifications.
Find the middle element of the array.
If the middle element is the target, return its index.
If the left half of the array is sorted and the target is within that range, search the left half.
If the right half of the array is sorted and the target is within that range, search the right half.
If the left half i...
Implement spelling and word suggestions for full keyboard phones
Create a dictionary of commonly used words
Use algorithms like Trie or Levenshtein distance to suggest words
Implement auto-correct feature
To determine if someone has won a game of tic-tac-toe on a board of any size, we need to check all possible winning combinations.
Create a function to check all rows, columns, and diagonals for a winning combination
Loop through the board and call the function for each row, column, and diagonal
If a winning combination is found, return the player who won
If no winning combination is found and the board is full, return...
Replace each number in an array with the product of all other numbers without using division.
Iterate through the array and calculate the product of all numbers to the left of the current index.
Then, iterate through the array again and calculate the product of all numbers to the right of the current index.
Multiply the left and right products to get the final product and replace the current index with it.
Create a cache with fast look up that only stores the N most recently accessed items
Implement a hash table with doubly linked list to store the items
Use a counter to keep track of the most recently accessed items
When the cache is full, remove the least recently accessed item
Program to find intersection of words in two files
Read both files and store words in two arrays
Loop through one array and check if word exists in other array
Print the common words
I applied via Walk-in and was interviewed in Apr 2024. There was 1 interview round.
Solve sanke and ladder puzzle
Implement 3 stacks in a single array efficiently
Divide the array into 3 equal parts
Use pointers to keep track of top of each stack
Implement push and pop operations for each stack
Handle stack overflow and underflow cases
Program to find depth of binary search tree without recursion
Use a stack to keep track of nodes and their depths
Iteratively traverse the tree and update the maximum depth
Return the maximum depth once traversal is complete
Find the maximum rectangle (in terms of area) under a histogram in linear time
Use a stack to keep track of the bars in the histogram
For each bar, calculate the area of the rectangle it can form
Pop the bars from the stack until a smaller bar is encountered
Keep track of the maximum area seen so far
Return the maximum area
Implement spelling and word suggestions for full keyboard phones
Create a dictionary of commonly used words
Use algorithms like Trie or Levenshtein distance to suggest words
Implement auto-correct feature
Recursive mergesort divides array into halves, sorts them and merges them back. O(nlogn) runtime.
Divide array into halves recursively
Sort each half recursively using mergesort
Merge the sorted halves back together
Runtime is O(nlogn)
Iterative version can be written using a stack or queue
To determine if someone has won a game of tic-tac-toe on a board of any size, we need to check all possible winning combinations.
Create a function to check all rows, columns, and diagonals for a winning combination
Loop through the board and call the function for each row, column, and diagonal
If a winning combination is found, return the player who won
If no winning combination is found and the board is full, return 'Tie...
Replace each number in an array with the product of all other numbers without using division.
Iterate through the array and calculate the product of all numbers to the left of the current index.
Then, iterate through the array again and calculate the product of all numbers to the right of the current index.
Multiply the left and right products to get the final product and replace the current index with it.
Create a cache with fast look up that only stores the N most recently accessed items
Implement a hash table with doubly linked list to store the items
Use a counter to keep track of the most recently accessed items
When the cache is full, remove the least recently accessed item
Program to find intersection of words in two files
Read both files and store words in two arrays
Loop through one array and check if word exists in other array
Print the common words
Use a hash map to index anagrams by sorting characters as keys.
Create a hash map where the key is the sorted string of characters.
For example, 'top' and 'pot' both map to 'opt'.
Store all anagrams in a list associated with the sorted key.
When querying, sort the input word and retrieve the list from the map.
Top trending discussions
Facebook's database design focuses on scalability, user relationships, and efficient data retrieval.
User Profiles: Each user has a unique profile containing personal information, posts, and friend connections.
Social Graph: A graph database structure to represent relationships between users, allowing for efficient querying of friends and connections.
Posts and Interactions: Tables for storing posts, likes, comments, and ...
Design a data structure to efficiently manage and delete expired web pages without references.
Use a hash table to store active pages with their URLs as keys for quick access.
Implement a linked list to maintain the order of pages for easy deletion of expired pages.
Utilize a timestamp to track the last access time of each page, allowing for easy identification of expired pages.
Consider a garbage collection mechanism that...
Design an algorithm for a mobile contact search application that enhances user experience and efficiency.
Utilize a trie data structure for efficient prefix searching of contact names.
Implement fuzzy search to handle typos or partial matches, e.g., searching 'Jon' returns 'John'.
Incorporate filters for sorting results by frequency of contact usage or recent interactions.
Allow voice search functionality for hands-free ac...
Given a 2D array of alphabets and a function to check valid English words, find all possible valid words adjacent to each other.
Create a recursive function to traverse the 2D array and check for valid words
Use memoization to avoid redundant checks
Consider edge cases such as words with repeating letters
Optimize the algorithm for time and space complexity
Insert a node at its correct position in a circular linked list containing sorted elements.
Traverse the linked list until the correct position is found
Handle the case where the value to be inserted is smaller than the smallest element or larger than the largest element
Update the pointers of the neighboring nodes to insert the new node
Consider the case where the linked list has only one node
McDonald's order system involves structured data flow from order placement to delivery, ensuring efficiency and accuracy.
1. Customer places an order using a digital kiosk or cashier, which captures order details in a structured format (e.g., JSON).
2. The order is sent to the kitchen display system (KDS), where it is displayed for kitchen staff to prepare.
3. The KDS organizes orders based on priority and preparation tim...
I applied via Instahyre and was interviewed in Nov 2024. There was 1 interview round.
It was on hackerrank(OA). There were two string and array based medium question.(Part of Blind 75 list)
Coding practice is a must . DSA concept is a must .
Coding Test 2 which involved a basic array ques . Checked logic ability
Use Selenium to extract values from a dynamic table
Identify the table using its locator (id, class, xpath, etc.)
Iterate through the rows and columns of the table to extract values
Use Selenium commands like findElements and getText to retrieve the values
Handle dynamic content by waiting for elements to be present or visible
To find the union of two arrays in Java, use a HashSet to store unique elements from both arrays.
Create two arrays of strings.
Convert arrays to HashSet to remove duplicates.
Combine both HashSets to get the union of arrays.
I applied via Naukri.com
Asked to write a program for Number palindrome
I applied via Approached by Company and was interviewed before Jun 2021. There were 2 interview rounds.
Frameworks provide structure and pre-built components for software development, but can also limit flexibility and require learning curve.
Advantage: Provides structure and pre-built components for faster development
Advantage: Can improve code quality and maintainability
Disadvantage: Can limit flexibility and customization
Disadvantage: Requires learning curve and potential dependency issues
Example: ReactJS provides a fr...
Oops stands for Object-Oriented Programming. It is a programming paradigm that uses objects to represent real-world entities.
Advantages: code reusability, modularity, encapsulation, inheritance, polymorphism
Disadvantages: complexity, steep learning curve, performance overhead
Example: creating a class 'Car' with properties like 'make', 'model', and 'year', and methods like 'start_engine' and 'stop_engine'
I applied via Company Website and was interviewed before Oct 2019. There were 4 interview rounds.
Some of the top questions asked at the Google Sdet interview -
based on 2 interview experiences
Difficulty level
Duration
Software Engineer
3k
salaries
| ₹33 L/yr - ₹65 L/yr |
Software Developer
2.1k
salaries
| ₹33.2 L/yr - ₹61.6 L/yr |
Senior Software Engineer
1.2k
salaries
| ₹35.9 L/yr - ₹70 L/yr |
Sde1
398
salaries
| ₹32.6 L/yr - ₹60 L/yr |
Data Scientist
379
salaries
| ₹26.8 L/yr - ₹50 L/yr |
Yahoo
Amazon
Microsoft Corporation