-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtextbook.tex
More file actions
146 lines (116 loc) · 3.3 KB
/
textbook.tex
File metadata and controls
146 lines (116 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
% !TEX program = xelatex
\documentclass[10pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage{FiraMono}
\usepackage{lmodern}
%\usepackage[T1]{fontenc}
\usepackage{xeCJK}
\setCJKmainfont{IPAMincho}
\setCJKsansfont{IPAGothic}
\setCJKmonofont{IPAGothic}
%\usepackage{CJKutf8}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
%\usepackage[cache=false]{minted}
\usepackage{tcolorbox}
\tcbuselibrary{minted}
\usepackage{chessboard}
\usepackage{hyperref}
\usepackage{forest}
\usepackage{sudoku}
\usepackage[english, bidi=default]{babel}
\babelfont[hebrew]{rm}{NewComputerModern10}
\usepackage{csquotes} %for quotes
%\definecolor{bg}{HTML}{282828} % from https://github.com/kevinsawicki/monokai
%\definecolor{bg}{HTML}{BBBBBB} % from https://github.com/kevinsawicki/monokai
%\setminted{bgcolor=bg,breaklines=true}
%\setminted{breaklines=true,linenos=true,frame=single}
\begin{document}
\title{Data Structures}
\author{Andrew Rosen}
\date{}
\maketitle
\tableofcontents
%defs
\newtcblisting[auto counter,number within=chapter]{pycode}[2][]{%
colback=black!5!white,
colframe=blue!75!black,fonttitle=\bfseries,
listing only,
listing engine= minted,
minted language=Python3,
minted style=colorful,
minted options={tabsize=4},
title= Listing (Python) \thetcbcounter: #2,#1
}
\newtcblisting[use counter from=pycode]{javacode}[2][]{%
colback=red!5!white,colframe=red!75!blue,fonttitle=\bfseries,
listing only,
listing engine= minted,
minted language=Java,
minted style=manni,
minted options={tabsize=4,breaklines=true},
title= Listing (Java) \thetcbcounter: #2,#1
}
%\newtcblisting[use counter from=pycode]{pyfile}[2][]{%
% colback=black!5!white,
% colframe=blue!75!black,fonttitle=\bfseries,
% listing only,
% listing engine= minted,
% listing file=#2,
% minted language=Python3,
% minted style=colorful,
% minted options={tabsize=4},
% title= Listing (Python) \thetcbcounter: #2,#1
%}
\newtcblisting[use counter from=pycode]{pyfile}[2][]{%
colback=black!5!white,
colframe=blue!75!black,
fonttitle=\bfseries,
listing only,
listing engine=minted,
listing file=#2, % Correct key for specifying the file with minted
minted language=Python3,
minted style=colorful,
minted options={tabsize=4},
title=Listing (Python) \thetcbcounter: \ifx\\#1\\#2\else#1\fi % Use #1 as custom title or fallback to filename (#2)
}
%The Document
\part{Preliminaries}
\include{intro}
% license and ack https://runestone.academy/ns/books/published/pythonds3/index.html?mode=browsing after adapting text.
\include{functions}
%\include{arrays}
%\include{analysis}
\part{Lists}
%\label{part-list}
%\include{arraylists}
%\include{linkedlists}
%\include{stacks}
%\include{queues}
\part{Recursion}
\include{recursion}
\include{trees}
%\include{heaps}
%\include{sorting}
\part{Hashing}
%\include{sets}
%\include{maps}
%\include{hash}
%\include{mapreduce}
\part{Relationships}
\include{graphs}
\include{graph algorithms}
%\part{Beyond}
%\chapter{A Nontechnical Introduction to NP-Completeness}
%\section{The Traveling Salesperson Problem (TSP)}
%\section{The Longest Path Problem}
%\section{The Rudrata/Hamiltonian Path Problem}
%\section{Everything is SAT and 3SAT}
%\chapter{Other Data Structures}
%\section{Skip Lists}
%\chapter{Distributed Hash Tables}
\bibliographystyle{plain}
\bibliography{python,others}
\end{document}