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: ComputerScience
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!”
Heap your sheep!
Heap concepts and Heap sort A heap is special tree-based data structure, with the tree being a Complete binary tree. (All levels are completely filled). It is a special, balanced binary-tree data structure where root node is compared with its children, and arranged according to the type of heap. Binary Tree A binary tree isContinue reading “Heap your sheep!”
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!”
Divide and Conquer
“Divide each difficulty into as many parts as is feasible and necessary to resolve it.” -Rene Descarts This quote aptly describes what is the logic and thinking behind divide and conquer !!So join us in learning this very important concept, which will meet you again in the next post also! Divide and Conquer is anContinue reading “Divide and Conquer”
Sorting Squared!
Ever wanted to sort out the books in your library at home? Or even the money in your purse? Then sorting comes your way! Sorting is a method of arranging items in a particular format. A list of items can be sorted in a number of ways in based upon various parameters, for instance, a numeric listContinue reading “Sorting Squared!”
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”
Patterns!
Hello World! Welcome to BitXorBytes! This is our first post in the series “Explaining Algorithms”. We start by discussing various interesting patterns! Right-Angled Perimeter Triangle * * * * * * * * * * * * Explanation: Since we want to print only the perimeter of the triangle, one must first figure out whereContinue reading “Patterns!”