/code-exercise

My implementation of useful data structure and algorithm.

Primary LanguageJava

code-interview

My implementation of useful data structure and algorithm.

Design Pattern

  • Singleton
  • Factory
  • Abstract Factory

Sorting (Sort algorithm.ipnb)

  • Quick sort
  • Bubble sort
  • Insertion sort
  • Heap sort
  • Shell sort
  • Merge sort

Data structure

  • Heap
  • Linked-list
  • Trees
  • Hashmap
  • Queue
  • Stack

Dynamic Programming

  • Compute Fibonacci sequence
  • Longest sequence problem

Mathematical problem

  • Karaskuba algorithm
  • Earathosne sieve
  • Two sum in O(n) time (lc_two_sum.py) - 1 Given an array of integers, return indices of the two numbers such that they add up to a specific target.
  • Find sum of all subarrays of an array
  • Find greatest common divisor of two numbers.

Graphs

  • Undirect graph
  • Direct graph
  • Depth First Search
  • Breadth First Search
  • Dijkstra's algorithm
  • Floyd's algorithm

Stack and queues

  • Queue
  • Stack

Linked list