Authors : Amandeep, Drishti, Srinidhi Hola geeks!! According to a proverb, it is said that, “If you have figs in your knapsack,everyone will want to be your friend”. But did you know the best algorithm to carry maximum figs in your knapsack? Here’s the post which will help you to! Fractional Knapsack problem statement WeContinue reading “What’s in your Knapsack?”
Tag Archives: timecomplexity
Search yourself!
Hello geeks! It has been a long time since our last post, so here’s another very easy and interesting topic to enjoy, ‘Searching’! Linear Search Linear search also called as sequential search, is the simplest way to search an element from a given list. It is this search technique which you use almost everywhere inContinue reading “Search yourself!”
Who’s counting?
Count Sort and Radix Sort Hello Geeks! How have you been? Together,we have completed bubble sort, insertion sort, selection sort, merge sort and quick sort! Whoa! That’s impressive, right? Today, we shall discuss a couple of more sorting techniques! Counting sort and Radix sort. These are very, very intriguing and captivating. So, read on! CountContinue reading “Who’s counting?”
Sorting logged!
Hello Geeks! In the previous post we had discussed the three basic sorting techniques: bubble sort, selection sort and insertion sort. In today’s post we shall discuss two much more efficient sorting techniques: “Merge sort” and “Quick sort”. So lets get started! Merge Sort Merge sort is a simple divide-and-conquer algorithm, which involves breaking downContinue reading “Sorting logged!”
Quiz Time!
Want to know how well you can print patterns? Or why time and space complexity is really that intriguing? Then here is a set of tricky and intresting patterns, and complexity based questions to ponder upon! Q(1-4) Write the looping conditions for these programs ! 1.Pattern 1 : 2.Pattern 2: 3. Pattern 3: 4. PatternContinue reading “Quiz Time!”
Space and Time Complexity
Survival of the Fittest, is commonly used to denote progress measured by ‘strength’ or ‘success’. If we think about it, the phrase is applicable to programming too. We are often unaware of what goes on behind our program during its compilation. There may be more than one way to solve a problem, we need toContinue reading “Space and Time Complexity”