fennecJ / alg_practice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some basic alg practice for my school's course

hw1

cal.c

  • A basic calculator implemented with stack

merge_sort.c

  • A basic merge_sort alg

hw2

insertion_sort.c

  • A basic insertion sort alg

qsort.c

  • A basic quick sort alg

cmp.c

  • A basic compare function comparing time cost between quick_sort, insertion_sort, and hybrid_quick_sort

hw3

binarytree.c

  • A binary tree which will print the whole tree in 2-D graph
  • You can type 'help' to show all available cmd

selection

  • A basic selection alg which take input.txt as input

hw4

brt.c

  • A uncompleted black red tree which doesn't support del function

matrix_order.c

  • A program which will show the order to multiple several matrix which take least computations via DP

rod.c

  • A program which will show the way to cut the rod for best interest via DP

hw5

0_1_knapsack.c

  • A program intented to solve the 0_1_knapsack problem via DP

morris_travesal.c

  • A program which introduce a way to travel a binary tree in preOrder/inOrder in O(1) space without recursion/stack/queue
  • Also introduce a way to invert a binary tree in O(1) space without recursion/stack/queue

About


Languages

Language:C 100.0%