Egg Dropping Problem

Today we will be talking about a very famous interview problem which is as follows: Given a certain amount of floors of a building (say k number of floors) and also given certain amount of eggs (say n number of eggs) … What is the least amount of egg drops Read more…

0-1 Knapsack Dynamic Programming

Question: Given weights and profits of n items, put these items in a knapsack of capacity W to get the maximum total profit. 0-1 property:  You can either pick the item or not. Also you have only one copy of each item. Let’s solve this question first using brute force Read more…

Bubble Sorting

Bubble sort is one of the simplest sorting algorithms but yet it is powerful. Bubble sort compares the element on the index and if that element is greater than i+1th element, it just swaps the element. The worst and average case time complexity of Bubble sort is O(n^2). Let’s see Read more…

Insert math as
Formula color
Type math using LaTeX
Preview
$${}$$
Nothing to preview
Insert