Skip to content

Commit 068fce6

Browse files
committed
Finish template for AB Tree exercise and solutions
1 parent 52a38aa commit 068fce6

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
\textbf{\LARGE{\color{tumgadPurple}(a,b) Trees}}\\
2+
\\
3+
\noindent
4+
Given the following \href{https://sebastianoner.github.io/TUMGAD/src/DataStructures/SearchStructures/ABTrees/ABLTrees}{\underline{(a,b) Tree}} with a = 2 and b = 4:
5+
%$INITTREE$
6+
Perform the following operations in their given order on the tree above:
7+
\begin{center}
8+
Delete: $DELETIONS$\\
9+
Insert: $INSERTIONS$\\
10+
\end{center}
11+
Use the preprints below to fill in the values (note that there may be more nodes printed than needed)\\
12+
\vspace{8px}
13+
\\
14+
Delete: \underline{\hspace{1cm}}\\
15+
\begin{center}
16+
\begin{tikzpicture}
17+
\tikzstyle{bplus}=[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]
18+
\tikzstyle{every node}=[bplus]
19+
\tikzstyle{level 1}=[sibling distance=25mm]
20+
\node {\nodepart{two}\nodepart{three}} [->]
21+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
22+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
23+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
24+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
25+
;
26+
\end{tikzpicture}
27+
\end{center}
28+
\vspace{8px}
29+
Delete: \underline{\hspace{1cm}}\\
30+
\begin{center}
31+
\begin{tikzpicture}
32+
\tikzstyle{bplus}=[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]
33+
\tikzstyle{every node}=[bplus]
34+
\tikzstyle{level 1}=[sibling distance=25mm]
35+
\node {\nodepart{two}\nodepart{three}} [->]
36+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
37+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
38+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
39+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
40+
;
41+
\end{tikzpicture}
42+
\end{center}
43+
\vspace{8px}
44+
Insert: \underline{\hspace{1cm}}\\
45+
\begin{center}
46+
\begin{tikzpicture}
47+
\tikzstyle{bplus}=[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]
48+
\tikzstyle{every node}=[bplus]
49+
\tikzstyle{level 1}=[sibling distance=25mm]
50+
\node {\nodepart{two}\nodepart{three}} [->]
51+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
52+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
53+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
54+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
55+
;
56+
\end{tikzpicture}
57+
\end{center}
58+
\vspace{8px}
59+
Insert: \underline{\hspace{1cm}}\\
60+
\begin{center}
61+
\begin{tikzpicture}
62+
\tikzstyle{bplus}=[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]
63+
\tikzstyle{every node}=[bplus]
64+
\tikzstyle{level 1}=[sibling distance=25mm]
65+
\node {\nodepart{two}\nodepart{three}} [->]
66+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
67+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
68+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
69+
child {node[rectangle split,rectangle split horizontal, rectangle split parts = 3, rectangle split empty part width=0.01mm, rectangle split every empty part={\hspace{0.35cm}}, draw]{\nodepart{two}\nodepart{three}}}
70+
;
71+
\end{tikzpicture}
72+
\end{center}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
\textbf{\LARGE{\color{tumgadRed}(a,b) Trees}}\\
2+
\\
3+
\noindent
4+
Given the following \href{https://sebastianoner.github.io/TUMGAD/src/DataStructures/SearchStructures/ABTrees/ABLTrees}{\underline{(a,b) Tree}} with a = 2 and b = 4:
5+
%$INITTREE$
6+
Perform the following operations in their given order on the tree above:
7+
\begin{center}
8+
Delete: $DELETIONS$\\
9+
Insert: $INSERTIONS$\\
10+
\end{center}
11+
%$ABTREE$

0 commit comments

Comments
 (0)