Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ds-algo #164

Open
wants to merge 70 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
82ba397
Merge branch 'develop'
xtaci May 21, 2014
fb2a1a0
0 warning
ZhangYou0122 May 21, 2014
28338d0
Merge branch 'develop'
xtaci May 21, 2014
b7dcd00
debugging
ZhangYou0122 May 31, 2014
a021ec6
Optimized test_prime
cdkr Jun 20, 2014
ddd9164
Merge pull request #28 from cdkr/patch-1
xtaci Jun 27, 2014
e0166f9
edit suffix tree
ZhangYou0122 Jul 2, 2014
0ca2bc9
Merge pull request #29 from ZhangYou0122/master
xtaci Jul 2, 2014
1400e7c
fix a bug in quicksort
xtaci Jul 25, 2014
f1473fa
rollback quicksort to random pivot version
xtaci Jul 25, 2014
6276136
AVL tree added, but there's still a bug in the erasure method
Sep 9, 2014
3171767
bug fixed, AVL trees now working properly
Sep 10, 2014
7637e26
Merge pull request #31 from afernandez90/master
xtaci Sep 11, 2014
3ae4d87
update Makefile
Sep 11, 2014
1312092
fix Makefile for compatibility of cxx11
Sep 11, 2014
2179038
Author information added to AVL headerfile
afernandez90 Sep 11, 2014
a51ee37
Merge pull request #32 from afernandez90/master
xtaci Sep 11, 2014
d81d1a6
+ Added .Net style Dictionary ( cache friendly hash table )
Samana Nov 27, 2014
6d0105b
Merge pull request #33 from Samana/master
xtaci Nov 27, 2014
bc16e44
fix a bug in RANDOM macro
Jan 21, 2015
b6e62b4
Fixed typographical error, changed arbitary to arbitrary in README.
orthographic-pedant Sep 30, 2015
a5c5240
fix a bug in dijkstra
xtaci Oct 22, 2015
8caabf1
a better implementation of heap inspired by golang/heap
xtaci Oct 23, 2015
2fb4c5a
clean
xtaci Oct 23, 2015
b575613
Update heap.h
xtaci Oct 23, 2015
e95583a
fix ident
xtaci Oct 23, 2015
fc65d5f
add qualifier
xtaci Oct 23, 2015
cd47f96
Merge pull request #38 from orthographic-pedant/spell_check/arbitrary
xtaci Oct 25, 2015
5269330
Add Fenwick Tree algorithm - Gabriel123Duarte
Gabriel123Duarte Nov 9, 2015
99defa0
Added some comments in the header file
Gabriel123Duarte Nov 9, 2015
0359b8d
Merge pull request #39 from Gabriel123Duarte/master
xtaci Nov 9, 2015
943b52a
Add shell sort
chenyanzhe Mar 30, 2016
cc7793c
Fix bugs in heap
chenyanzhe Mar 30, 2016
38925de
Merge pull request #43 from yanzhe-chen/heap-bug-fix
xtaci Mar 31, 2016
6ca8366
indent
xtaci Mar 31, 2016
c3c99c4
update
xtaci Apr 26, 2016
50035c9
update
xtaci Apr 26, 2016
b8c632b
definiton -> definition
tmdrnjs54 May 19, 2016
841a1bd
h:55 inital -> initial
tmdrnjs54 May 19, 2016
70a90bd
h:39 definiton -> definition
tmdrnjs54 May 19, 2016
a255433
h:16 seperately -> separately h:17 fucntion -> function
tmdrnjs54 May 19, 2016
0556913
h:78 apropriate -> appropriate
tmdrnjs54 May 19, 2016
a0ce506
h:100 higer -> higher
tmdrnjs54 May 19, 2016
4cf920e
h:27: postion -> position h:260: beginnig -> beginning h:269: seper…
tmdrnjs54 May 19, 2016
56e9576
h:66: arbitary -> arbitrary
tmdrnjs54 May 19, 2016
20ecf38
85: seperate -> separate
tmdrnjs54 May 19, 2016
508dc71
Merge pull request #45 from tmdrnjs54/master
xtaci May 19, 2016
e9a8007
issue #46 :
heshamsafi May 21, 2016
b01ee93
Merge pull request #47 from heshamsafi/master
xtaci May 21, 2016
7f8d1ab
rearranged
ahmetince Aug 6, 2016
a30b35d
Merge pull request #48 from ahmetince/patch-1
xtaci Aug 6, 2016
df18218
add .travis.yml
xtaci Aug 7, 2016
7882778
upd readme
xtaci Aug 7, 2016
e30dd73
Correct import guard macro name
htfy96 Sep 1, 2016
b8b2ed5
Rename all identifiers with 2 underscores at the beginning
htfy96 Sep 1, 2016
bd7da6d
Merge pull request #51 from htfy96/master
xtaci Sep 1, 2016
68ad0f2
Update README.md
xtaci Oct 22, 2016
c9fae93
Add Lowest commen ancestor algorithm
Dec 25, 2016
ffe13e9
Add const size for array
Dec 25, 2016
e654213
update makefile
xtaci Jan 20, 2017
5c50c33
apply OOP principles to LCA
Feb 20, 2017
50fb4e1
Merge pull request #60 from Hamada14/master
xtaci Feb 21, 2017
82dd1bb
Delete .goutputstream-UUQE8X
xtaci Feb 21, 2017
1a94def
add LCA entry to readme
Feb 21, 2017
f2895cf
Merge pull request #65 from Hamada14/master
xtaci Feb 22, 2017
fb003ae
Update README.md
yrong Apr 16, 2017
c8d37ab
Merge pull request #67 from yrong/patch-1
xtaci Apr 16, 2017
a4333de
Update README.md
xtaci Jun 3, 2017
21aed15
This pull request solve the cleaning of *.o file issue
kounkou Feb 18, 2018
2ac19a7
Merge pull request #80 from kounkou/patch-makefile
xtaci Feb 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: cpp
compiler:
- clang
script:
- make
234 changes: 210 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
.PHONY: all clean
CC=gcc
CPP=g++
CC=clang
CPP=clang++
AR=ar
RANLIB=ranlib
CFLAGS= -g -Wall -Wno-unused-function -std=gnu++0x
CFLAGS= -g -Wall -Wno-unused-function
C11FLAGS= -g -Wall -Wno-unused-function -std=c++11
SRCDIR = ./src
INCLUDEDIR = -I./include -I.
DEPS =
LIBS = -lm
PROGRAMS = m_based_demo \

PROGRAMS = m_based_demo \
integer_demo \
insertion_sort_demo \
radix_sort_demo \
shuffle_demo \
quick_sort_demo \
merge_sort_demo \
random_select_demo \
hash_multi_demo \
hash_table_demo \
double_linked_list_demo \
stack_demo \
queue_demo \
priority_queue_demo \
prime_demo \
insertion_sort_demo \
shell_sort_demo \
radix_sort_demo \
shuffle_demo \
quick_sort_demo \
merge_sort_demo \
random_select_demo \
hash_multi_demo \
hash_table_demo \
double_linked_list_demo \
stack_demo \
queue_demo \
universal_hash_demo \
perfect_hash_demo \
binary_search_tree_demo \
Expand Down Expand Up @@ -53,8 +54,6 @@ PROGRAMS = m_based_demo \
random_demo \
k-means_demo \
kmp_demo \
heap_sort_demo \
kruskal_mst_demo \
LRU_cache_demo \
base64_demo \
max_subarray_demo \
Expand All @@ -69,13 +68,200 @@ PROGRAMS = m_based_demo \
selection_sort_demo \
8queue_demo \
palindrome_demo \
suffix_array_demo \
suffix_tree_demo
suffix_tree_demo \
avl_demo

all: $(PROGRAMS)

%: $(SRCDIR)/%.cpp $(DEPS)
$(CPP) $(CFLAGS) -o $@ $< $(INCLUDEDIR) $(LIBS)
m_based_demo: $(SRCDIR)/m_based_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

integer_demo: $(SRCDIR)/integer_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

insertion_sort_demo: $(SRCDIR)/insertion_sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

shell_sort_demo: $(SRCDIR)/shell_sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

radix_sort_demo: $(SRCDIR)/radix_sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

shuffle_demo: $(SRCDIR)/shuffle_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

quick_sort_demo: $(SRCDIR)/quick_sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

merge_sort_demo: $(SRCDIR)/merge_sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

random_select_demo: $(SRCDIR)/random_select_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

hash_multi_demo: $(SRCDIR)/hash_multi_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

hash_table_demo: $(SRCDIR)/hash_table_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

double_linked_list_demo: $(SRCDIR)/double_linked_list_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

stack_demo: $(SRCDIR)/stack_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

queue_demo: $(SRCDIR)/queue_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

priority_queue_demo: $(SRCDIR)/priority_queue_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

prime_demo: $(SRCDIR)/prime_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

universal_hash_demo: $(SRCDIR)/universal_hash_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

perfect_hash_demo: $(SRCDIR)/perfect_hash_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

binary_search_tree_demo: $(SRCDIR)/binary_search_tree_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

rbtree_demo: $(SRCDIR)/rbtree_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

heap_demo: $(SRCDIR)/heap_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

interval_tree_demo: $(SRCDIR)/interval_tree_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

dos_tree_demo: $(SRCDIR)/dos_tree_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

skiplist_demo: $(SRCDIR)/skiplist_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

lcs_demo: $(SRCDIR)/lcs_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

prim_mst_demo: $(SRCDIR)/prim_mst_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

directed_graph_demo: $(SRCDIR)/directed_graph_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

undirected_graph_demo: $(SRCDIR)/undirected_graph_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

dijkstra_demo: $(SRCDIR)/dijkstra_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

bellman_ford_demo: $(SRCDIR)/bellman_ford_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

graph_search_demo: $(SRCDIR)/graph_search_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

edmonds_karp_demo: $(SRCDIR)/edmonds_karp_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

astar_demo: $(SRCDIR)/astar_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

hash_string_demo: $(SRCDIR)/hash_string_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

bitset_demo: $(SRCDIR)/bitset_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

bloom_filter_demo: $(SRCDIR)/bloom_filter_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

sha1_demo: $(SRCDIR)/sha1_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

huffman_demo: $(SRCDIR)/huffman_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

word_seg_demo: $(SRCDIR)/word_seg_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

md5_demo: $(SRCDIR)/md5_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

trie_demo: $(SRCDIR)/trie_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

simhash_demo: $(SRCDIR)/simhash_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

imath_demo: $(SRCDIR)/imath_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

random_demo: $(SRCDIR)/random_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

k-means_demo: $(SRCDIR)/k-means_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

kmp_demo : $(SRCDIR)/kmp_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

kruskal_mst_demo: $(SRCDIR)/kruskal_mst_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

LRU_cache_demo: $(SRCDIR)/LRU_cache_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

base64_demo: $(SRCDIR)/base64_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

max_subarray_demo: $(SRCDIR)/max_subarray_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

disjoint-set_demo: $(SRCDIR)/disjoint-set_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

relabel_to_front_demo: $(SRCDIR)/relabel_to_front_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

btree_demo: $(SRCDIR)/btree_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

sort_demo: $(SRCDIR)/sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

fib-heap_demo: $(SRCDIR)/fib-heap_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

scc_demo: $(SRCDIR)/scc_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

bubble_sort_demo: $(SRCDIR)/bubble_sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

selection_sort_demo: $(SRCDIR)/selection_sort_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

8queue_demo: $(SRCDIR)/8queue_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

palindrome_demo: $(SRCDIR)/palindrome_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

suffix_tree_demo: $(SRCDIR)/suffix_tree_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

avl_demo: $(SRCDIR)/avl_demo.cpp
$(CPP) $(CFLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

suffix_array_demo: $(SRCDIR)/suffix_array_demo.cpp
$(CPP) $(C11FLAGS) -o $@ $^ $(INCLUDEDIR) $(LIBS)

clean:
rm -rf $(PROGRAMS) *.dSYM
rm -rf $(PROGRAMS) *.dSYM *.o

Loading