###### Data Structure and Algorithm

Linked lists are linear data structures that hold data in individual objects called nodes. These nodes hold both the data and a reference to the next node in the list. Linked lists are often used because of their efficient insertion and deletion. They can be used to implement stacks, queues, and Read more…

## Big-O Chart Comparision

Credits to the contributors from biocheatsheet.com

## FizzBuzz

For numbers which are divisible of both 3 and 5, print “FizzBuzz” instead of the number. Divisible by 3 print “Fizz” and divisible by 5 print “Buzz”

## Binary Search

The time complexity of this algorithm is in the order of O(log n). The binary search algorithm compares the input value to the middle element of the sorted collection. func Search(n int, f func(int) bool) int Search uses binary search to find and return the smallest index i in [0, Read more…

## Linear Search

The time complexity of the linear search algorithm is O(n). This means that the running time increases at most linearly with the size of the input.

## Sorting: Bubble

The bubble sort algorithm is a sorting algorithm that compares a pair of neighboring elements and swaps them if they are in the wrong order.  https://play.golang.org/p/1ob1N-sZKmp Note: No nested loop used help in reducing the unnecessary looping of all element even a single pair of the unsorted list.

## Slice, for, len(), cap(), append, copy

Shortcoming of Go array is address by Go slice. It can be appended to elements after the capacity has reached its size. Slices are dynamic and can double the current capacity in order to add more elements. https://play.golang.org/p/_8fqAbg2cUJ Slice and Functions ( call by reference) https://play.golang.org/p/Sc2yD7rXpRl

## Array, for, for..range, len(), function(call by value)

an ordered sequence of elements of the same type and access to an element by index begins with zero for the first element. https://play.golang.org/p/-DRHLqWWB66 Go arrays are not dynamic but have a fixed size. To add more elements than the size, a bigger array needs to be created and all Read more…