Skip to content

Algorithms

David Coy edited this page Feb 26, 2017 · 3 revisions

Link to my repo on Python Algorithms: Python Problem Solving

Contents

Algorithm Efficiency

Big O

Search Algorithms

Binary Search

Linear Search

Breadth-first Search

A breadth-first search is a style of searching where you check every child node at the same level for your intended value before moving onto the next level of child nodes.

Depth-first Search

A depth-first search is sort of the inverse of a breadth-first search. With depth-first, you take each child branch as far as you can down the tree, then backtrack up to the last-visited parent node after reaching the end of the given branch.

sorting Algorithms

Selection Sort

Insertion Sort

Quick Sort

Merge Sort

With a Big(O) of n•log2(n)+n Merge sort is a particularly efficient sorting algorithm for large data sets. Merge sort works by splitting a given input array into two sorted halves, then traversing through each element in those two arrays and placing the smaller element into your output array. It recurses through the entire array, splitting in two again and again until each element is of length 1 or 0, then simply placing each known array in sorted order.

Heap Sort

Tree Sort

Radix Sort