Interview

Design Pastebin

Problem Design a system like Pastebin, where a user can enter a piece of text and get a randomly generated URL to access it. Solution Pastebin is a web service that enable users to store plain text over the network and generate unique URLs to access the uploaded data. It [...]

2020-05-23T13:18:45+05:30Categories: Interview|Tags: |

Product sales rank

Problem A large eCommerce company wishes to list the best-selling products, overall and by category. For example, one product might be the #1056th best-selling product overall but th #13th best-selling product under Sports Equipment and the #24th best-selling product under Safety. Describe how you would design the system Solution Scope the Problem First, [...]

2024-04-17T23:18:37+05:30Categories: Interview|Tags: |

Detect the duplicate URLs

Problem You have 10 billion URLs. How do you detect the duplicate documents? In this case, assume that "duplicate" means that the URLs are identical. Approach If each URL is an average of 100 characters, and each character is 4 bytes, then this list of 10 billion URLs will take [...]

2024-04-17T23:18:47+05:30Categories: Interview|Tags: |

Software Interview questions : Set 21

Check if a given array can represent Preorder Traversal of Binary Search Tree Partitioning a linked list around a given value and If we don’t care about making the elements of the list Implement two stacks in an array Implement k stacks in a single array Sort a stack using [...]

2019-02-02T12:47:23+05:30Categories: Interview|

Software Interview questions : Set 20

Find two prime numbers with given sum Longest consecutive sequence in Binary tree Median of two sorted arrays of same size Number of paths with exactly k coins Rearrange characters in a string such that no two adjacent are same Replace every element with the greatest element on right side [...]

2019-06-05T13:49:47+05:30Categories: Interview|

Software Interview questions : Set 19

Max Array Sum  Abbreviation Candies Sum of minimum absolute difference of each array element Smallest Difference pair of values between two unsorted Arrays Count all possible paths from top left to bottom right of a mXn matrix Print all possible paths from top left to bottom right of a mXn [...]

2018-10-17T17:03:00+05:30Categories: Interview|

OOPS Design Questions

Design an online hotel booking system like OYO Rooms Design a movie ticket booking system like Bookmyshow Object Oriented Design of Juke Box Design a Vending Machine in Java Design a valet parking system Design Coffee Shop Design vector graphics application Object oriented design for an online auction site Relate [...]

2024-04-17T23:21:11+05:30Categories: Interview|Tags: |

Software Interview questions : Set 18

Interval Selection Check whether a given graph is Bipartite or not Palindromic Substrings Floyd Warshall Algorithm Dijkstra’s shortest path algorithm Subsets Print all paths from a given source to a destination New Year Chaos Minimum number of swaps required to sort an array Next Greater Element II Find maximum of [...]

2024-05-15T19:54:50+05:30Categories: Interview|Tags: |

Software Interview questions : Set 17

Count of Smaller Numbers After Self Given a string, print all possible palindromic partitions Remove Invalid Parentheses Wildcard Matching Regular Expression Matching Three way partitioning of an array around a given range Median of two sorted arrays with different sizes in O(log(min(n, m))) Best Time to Buy and Sell Stock [...]

2018-07-31T23:23:19+05:30Categories: Interview|
Go to Top