Skip to content

Commit

Permalink
updated page headers and the title
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxinyu95 committed Oct 31, 2023
1 parent b9bb259 commit 506646a
Show file tree
Hide file tree
Showing 42 changed files with 61 additions and 60 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Elementary Algorithms
Elementary Functional Algorithms
====

Edition: $\displaystyle e = \sum \limits _{n=0}^{\infty }{\frac {1}{n!}} = 1 + {\frac {1}{1}}+{\frac {1}{1\cdot 2}}+{\frac {1}{1\cdot 2\cdot 3}}+\cdots = 2.718283$

2023/10

This book introduces about elementary algorithms and data structure. It includes side-by-side comparison about purely functional realization and their imperative counterpart, with 120 exercises and answers.
This book introduces about elementary functional algorithms and data structures. It includes side-by-side comparison about purely functional realization and their imperative counterpart, with 120 exercises and answers.

<img src="https://user-images.githubusercontent.com/332938/95418499-442e4b00-096a-11eb-81b9-496020aa5f10.jpg" width="400">

Expand All @@ -16,21 +16,21 @@ I am adding exercises and answers to the **second edition** from 2023/03 (added


- Preface
- Chapter 0, List;
- Chapter 1, Binary Search Tree;
- Chapter 2, Insertion sort;
- Chapter 3, Red-black tree;
- Chapter 4, AVL tree;
- Chapter 5, Radix tree, Trie and Prefix Tree;
- Chapter 6, B-Trees;
- Chapter 7, Binary Heaps;
- Chapter 8, Selection sort;
- Chapter 9, Binomial heap, Fibonacci heap, and pairing heap;
- Chapter 10, Queue;
- Chapter 11, Sequence;
- Chapter 12, Divide and conquer sort;
- Chapter 13, Search;
- Appendix and answers
- Chapter 1, List;
- Chapter 2, Binary Search Tree;
- Chapter 3, Insertion sort;
- Chapter 4, Red-black tree;
- Chapter 5, AVL tree;
- Chapter 6, Radix tree, Trie and Prefix Tree;
- Chapter 7, B-Trees;
- Chapter 8, Binary Heaps;
- Chapter 9, Selection sort;
- Chapter 10, Binomial heap, Fibonacci heap, and pairing heap;
- Chapter 11, Queue;
- Chapter 12, Sequence;
- Chapter 13, Divide and conquer sort;
- Chapter 14, Search;
- Appendices and answers

Install
--------
Expand Down
2 changes: 1 addition & 1 deletion algoxy-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
% ================================================================

\title{
{\bf \Huge Elementary Algorithms}
{\bf \Huge Elementary Functional Algorithms}
\centering
\scalebox{0.4}{\includegraphics{img/fibonacci-spiral}}
}
Expand Down
2 changes: 1 addition & 1 deletion algoxy-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
% ================================================================

\title{
{\bf \Huge 基本算法}
{\bf \Huge 基本函数式算法}
\centering
\scalebox{0.4}{\includegraphics{img/fibonacci-spiral}}
}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/elementary/queue/queue-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{Queue}{Elementary Algorithms}
%\markboth{Queue}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Queue}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/elementary/queue/queue-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{队列}{基本算法}
%\markboth{队列}{基本算法}

\ifx\wholebook\relax
\chapter{队列}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/elementary/sequence/sequence-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{Sequence}{Elementary Algorithms}
%\markboth{Sequence}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Sequence}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/elementary/sequence/sequence-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{序列}{基本算法}
%\markboth{序列}{基本算法}

\ifx\wholebook\relax
\chapter{序列}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/heap/binary-heap/bheap-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{Binary Heaps}{Elementary Algorithms}
%\markboth{Binary Heaps}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Binary Heaps}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/heap/binary-heap/bheap-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
\maketitle
\fi

\markboth{二叉堆}{基本算法}
%\markboth{二叉堆}{基本算法}

\ifx\wholebook\relax
\chapter{二叉堆}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/heap/other-heaps/kheap-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{Binomial heap, Fibonacci heap, and pairing heap}{Elementary Algorithms}
%\markboth{Binomial heap, Fibonacci heap, and pairing heap}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Binomial heap, Fibonacci heap, and pairing heap}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/heap/other-heaps/kheap-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{二项式堆、斐波那契堆、配对堆}{基本算法}
%\markboth{二项式堆、斐波那契堆、配对堆}{基本算法}

\ifx\wholebook\relax
\chapter{二项式堆、斐波那契堆、配对堆}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/AVL-tree/avltree-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{AVL tree}{Elementary Algorithms}
%\markboth{AVL tree}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{AVL tree}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/AVL-tree/avltree-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{AVL树}{基本算法}
%\markboth{AVL树}{基本算法}

\ifx\wholebook\relax
\chapter{AVL树}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/B-tree/btree-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
\maketitle
\fi

\markboth{B-Tree}{Elementary Algorithms}
%\markboth{B-Tree}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{B-Tree}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/B-tree/btree-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
\maketitle
\fi

\markboth{B树}{基本算法}
%\markboth{B树}{基本算法}

\ifx\wholebook\relax
\chapter{B树}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/binary-search-tree/bstree-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{Binary search tree}{Elementary Algorithms}
%\markboth{Binary search tree}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Binary Search Tree}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/binary-search-tree/bstree-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{二叉搜索树}{基本算法}
%\markboth{二叉搜索树}{基本算法}

\ifx\wholebook\relax
\chapter{二叉搜索树}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/red-black-tree/rbtree-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{Red-black tree}{Elementary Algorithms}
%\markboth{Red-black tree}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Red-black tree}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/red-black-tree/rbtree-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\maketitle
\fi

\markboth{红黑树}{基本算法}
%\markboth{红黑树}{基本算法}

\ifx\wholebook\relax
\chapter{红黑树}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/suffix-tree/stree-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
\maketitle
\fi

\markboth{Suffix Tree}{Elementary Algorithms}
%\markboth{Suffix Tree}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Suffix Tree}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/suffix-tree/stree-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
\maketitle
\fi

\markboth{后缀树}{初等算法}
%\markboth{后缀树}{初等算法}

\ifx\wholebook\relax
\chapter{后缀树}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/trie/trie-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{Radix tree}{Elementary algorithms}
%\markboth{Radix tree}{Elementary algorithms}

\ifx\wholebook\relax
\chapter{Radix tree}
Expand Down
2 changes: 1 addition & 1 deletion datastruct/tree/trie/trie-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{基数树}{基本算法}
%\markboth{基数树}{基本算法}

\ifx\wholebook\relax
\chapter{基数树}
Expand Down
2 changes: 1 addition & 1 deletion others/appendix/avltree/avl-proof-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\maketitle
\fi

\markboth{AVL tree - proofs and the delete algorithm}{Elementary Algorithms}
%\markboth{AVL tree - proofs and the delete algorithm}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{AVL tree - proofs and the delete algorithm}
Expand Down
2 changes: 1 addition & 1 deletion others/appendix/avltree/avl-proof-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\maketitle
\fi

\markboth{AVL树——证明和删除算法}{基本算法}
%\markboth{AVL树——证明和删除算法}{基本算法}

\ifx\wholebook\relax
\chapter{AVL树——证明和删除算法}
Expand Down
7 changes: 4 additions & 3 deletions others/appendix/bib-en.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
% ================================================================
% Appendix
% ================================================================
\renewcommand{\bibname}{References}
\markboth{\bibname}{}
\phantomsection
\addcontentsline{toc}{chapter}{\bibname}

\begin{thebibliography}{99}

Expand Down
2 changes: 1 addition & 1 deletion others/appendix/haskell/haskell-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{Haskell Examples}{Elementary Algorithms}
%\markboth{Haskell Examples}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Haskell examples}
Expand Down
2 changes: 1 addition & 1 deletion others/appendix/haskell/haskell-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{Haskell例子程序}{Elementary Algorithms}
%\markboth{Haskell例子程序}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Haskell例子程序}
Expand Down
2 changes: 1 addition & 1 deletion others/appendix/list/list-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{List}{Elementary Algorithms}
%\markboth{List}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{List}
Expand Down
2 changes: 1 addition & 1 deletion others/appendix/list/list-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{列表}{基本算法}
%\markboth{列表}{基本算法}

\ifx\wholebook\relax
\chapter{列表}
Expand Down
2 changes: 1 addition & 1 deletion others/appendix/rbt-del/rbt-del-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\maketitle
\fi

\markboth{Red-black tree}{Elementary Algorithms}
%\markboth{Red-black tree}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Imperative delete for red-black tree}
Expand Down
2 changes: 1 addition & 1 deletion others/appendix/rbt-del/rbt-del-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\maketitle
\fi

\markboth{红黑树}{基本算法}
%\markboth{红黑树}{基本算法}

\ifx\wholebook\relax
\chapter{红黑树的命令式删除算法}
Expand Down
2 changes: 1 addition & 1 deletion others/preface/preface-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
\maketitle
\fi

\markboth{Preface}{Elementary Algorithms}
\markboth{Preface}{}

\chapter*{Preface to the second edition}
\phantomsection % so hyperref creates bookmarks
Expand Down
2 changes: 1 addition & 1 deletion others/preface/preface-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
\maketitle
\fi

\markboth{前言}{基本算法}
\markboth{前言}{}

\chapter*{第二版前言}
\phantomsection % so hyperref creates bookmarks
Expand Down
2 changes: 1 addition & 1 deletion search/search-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{Solution search}{Elementary Algorithms}
%\markboth{Solution search}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Solution search}
Expand Down
2 changes: 1 addition & 1 deletion search/search-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{搜索}{基本算法}
%\markboth{搜索}{基本算法}

\ifx\wholebook\relax
\chapter{搜索}
Expand Down
2 changes: 1 addition & 1 deletion sorting/dc-sort/dcsort-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{Quick sort and merge sort}{Elementary Algorithms}
%\markboth{Quick sort and merge sort}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Quick sort and merge sort}
Expand Down
2 changes: 1 addition & 1 deletion sorting/dc-sort/dcsort-zh-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\maketitle
\fi

\markboth{快速排序和归并排序}{基本算法}
%\markboth{快速排序和归并排序}{基本算法}

\ifx\wholebook\relax
\chapter{快速排序和归并排序}
Expand Down
2 changes: 1 addition & 1 deletion sorting/insertion-sort/isort-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\maketitle
\fi

\markboth{Insertion sort}{Elementary Algorithms}
%\markboth{Insertion sort}{Elementary Algorithms}

\ifx\wholebook\relax
\chapter{Insertion sort}
Expand Down
Loading

0 comments on commit 506646a

Please sign in to comment.