Created
October 5, 2013 04:39
-
-
Save csthompson/6836728 to your computer and use it in GitHub Desktop.
LaTex Ref.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\usetikzlibrary{calc,shapes.multipart,chains,arrows} | |
\begin{document} | |
\begin{tikzpicture} | |
\foreach \n [count=\i from 0] in {4,3,2,1} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*.5 cm) { \n}; } | |
\node[draw,minimum width =1cm,minimum height=2ex, left=2 cm of 1] (A) {3}; | |
\node[draw,minimum width =1cm,minimum height=2ex, left=2 cm of 2] (B) {4}; | |
\node[draw,minimum width =1cm,minimum height=2ex, left=2 cm of 3] (C) {2}; | |
\node[draw,minimum width =1cm,minimum height=2ex, left=2 cm of 4] (D) {1}; | |
\draw[-latex] (A.east) -- (3.west); | |
\draw[-latex] (B.east) -- (4.west); | |
\draw[-latex] (C.east) -- (2.west); | |
\draw[-latex] (D.east) -- (1.west); | |
\end{tikzpicture} | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\usepackage{tikz-qtree} | |
\usepackage{fancybox} | |
\usetikzlibrary{calc,shapes.multipart,chains,arrows} | |
\begin{document} | |
\section{Input} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {8,11,10,7} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[list,on chain, right=.5cm of 8] (AA) {9}; | |
\node[list,on chain] (AB) {12}; | |
\node[list,on chain] (AC) {13}; | |
\node[on chain,draw,inner sep=6pt] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[*->] let \p1 = (AA.two), \p2 = (AA.center) in (\x1,\y2) -- (AB); | |
\draw[*->] let \p1 = (AB.two), \p2 = (AB.center) in (\x1,\y2) -- (AC); | |
\draw[*->] let \p1 = (AC.two), \p2 = (AC.center) in (\x1,\y2) -- (AD); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {14}; | |
\node[list,on chain] (BB) {15}; | |
\node[list,on chain] (BC) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[*->] let \p1 = (BB.two), \p2 = (BB.center) in (\x1,\y2) -- (BC); | |
\draw[*->] let \p1 = (BC.two), \p2 = (BC.center) in (\x1,\y2) -- (BD); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {17}; | |
\node[list,on chain] (CB) {21}; | |
\node[list,on chain] (CC) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[*->] let \p1 = (CB.two), \p2 = (CB.center) in (\x1,\y2) -- (CC); | |
\draw[*->] let \p1 = (CC.two), \p2 = (CC.center) in (\x1,\y2) -- (CD); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {18}; | |
\node[list,on chain] (DB) {19}; | |
\node[list,on chain] (DC) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[*->] let \p1 = (DB.two), \p2 = (DB.center) in (\x1,\y2) -- (DC); | |
\draw[*->] let \p1 = (DC.two), \p2 = (DC.center) in (\x1,\y2) -- (DD); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\\[1cm] | |
\section{Initial Step} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {9,17,18,14} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[list,on chain, right=.5cm of 8] (AA) {12}; | |
\node[list,on chain] (AB) {13}; | |
\node[on chain,draw,inner sep=6pt] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[*->] let \p1 = (AA.two), \p2 = (AA.center) in (\x1,\y2) -- (AB); | |
\draw[*->] let \p1 = (AB.two), \p2 = (AB.center) in (\x1,\y2) -- (AD); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {15}; | |
\node[list,on chain] (BB) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[*->] let \p1 = (BB.two), \p2 = (BB.center) in (\x1,\y2) -- (BC); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {21}; | |
\node[list,on chain] (CB) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[*->] let \p1 = (CB.two), \p2 = (CB.center) in (\x1,\y2) -- (CD); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {19}; | |
\node[list,on chain] (DB) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[*->] let \p1 = (DB.two), \p2 = (DB.center) in (\x1,\y2) -- (DD); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.7 [.8 [.10 ] ] [.11 ] ] | |
] | |
\end{tikzpicture} | |
\newpage | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 0}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {9,17,18, 15} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[list,on chain, right=.5cm of 8] (AA) {12}; | |
\node[list,on chain] (AB) {13}; | |
\node[on chain,draw,inner sep=6pt] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[*->] let \p1 = (AA.two), \p2 = (AA.center) in (\x1,\y2) -- (AB); | |
\draw[*->] let \p1 = (AB.two), \p2 = (AB.center) in (\x1,\y2) -- (AD); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {21}; | |
\node[list,on chain] (CB) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[*->] let \p1 = (CB.two), \p2 = (CB.center) in (\x1,\y2) -- (CD); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {19}; | |
\node[list,on chain] (DB) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[*->] let \p1 = (DB.two), \p2 = (DB.center) in (\x1,\y2) -- (DD); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.8 [.10 [.14 ] ] [.11 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 3}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {12,17,18, 15} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[list,on chain, right=.5cm of 8] (AA) {13}; | |
\node[on chain,draw,inner sep=6pt] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[*->] let \p1 = (AA.two), \p2 = (AA.center) in (\x1,\y2) -- (AB); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {21}; | |
\node[list,on chain] (CB) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[*->] let \p1 = (CB.two), \p2 = (CB.center) in (\x1,\y2) -- (CD); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {19}; | |
\node[list,on chain] (DB) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[*->] let \p1 = (DB.two), \p2 = (DB.center) in (\x1,\y2) -- (DD); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.9 [.10 [.14 ] ] [.11 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 3}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {13,17,18, 15} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {21}; | |
\node[list,on chain] (CB) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[*->] let \p1 = (CB.two), \p2 = (CB.center) in (\x1,\y2) -- (CD); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {19}; | |
\node[list,on chain] (DB) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[*->] let \p1 = (DB.two), \p2 = (DB.center) in (\x1,\y2) -- (DD); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.10 [.12 [.14 ] ] [.11 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 1}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {13,17,19, 15} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {21}; | |
\node[list,on chain] (CB) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[*->] let \p1 = (CB.two), \p2 = (CB.center) in (\x1,\y2) -- (CD); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.11 [.12 [.18 ] ] [.14 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 2}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {13,21,19, 15} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.12 [.17 [.18 ] ] [.14 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 3}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {,21,19, 15} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.13 [.17 [.18 ] ] [.14 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 3}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {,21,19, 15} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[list,on chain, right=.5cm of 7] (BA) {24}; | |
\node[on chain,draw,inner sep=6pt] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[*->] let \p1 = (BA.two), \p2 = (BA.center) in (\x1,\y2) -- (BB); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.14 [.17 ] [.18 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 0}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {,21,19, 24} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 7] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.15 [.17 ] [.18 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\node[list,on chain] (FH) {14}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\draw[*->] let \p1 = (FG.two), \p2 = (FH.center) in (\x1,\y2) -- (FH); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 0}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {,21,19, } | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 7] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[list,on chain, right=.5cm of 11] (CA) {25}; | |
\node[on chain,draw,inner sep=6pt] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[*->] let \p1 = (CA.two), \p2 = (CA.center) in (\x1,\y2) -- (CB); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.17 [.24 ] [.18 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\node[list,on chain] (FH) {14}; | |
\node[list,on chain] (FI) {15}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\draw[*->] let \p1 = (FG.two), \p2 = (FH.center) in (\x1,\y2) -- (FH); | |
\draw[*->] let \p1 = (FH.two), \p2 = (FI.center) in (\x1,\y2) -- (FI); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 2}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {,25,19, } | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 7] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 11] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[list,on chain, right=.5cm of 10] (DA) {23}; | |
\node[on chain,draw,inner sep=6pt] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[*->] let \p1 = (DA.two), \p2 = (DA.center) in (\x1,\y2) -- (DB); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.18 [.24 ] [.21 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\node[list,on chain] (FH) {14}; | |
\node[list,on chain] (FI) {15}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\draw[*->] let \p1 = (FG.two), \p2 = (FH.center) in (\x1,\y2) -- (FH); | |
\draw[*->] let \p1 = (FH.two), \p2 = (FI.center) in (\x1,\y2) -- (FI); | |
\end{tikzpicture} | |
\\[.25cm] | |
Continued... | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {17}; | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 1}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {,25,23, } | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 7] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 11] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 10] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.19 [.24 ] [.21 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\node[list,on chain] (FH) {14}; | |
\node[list,on chain] (FI) {15}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\draw[*->] let \p1 = (FG.two), \p2 = (FH.center) in (\x1,\y2) -- (FH); | |
\draw[*->] let \p1 = (FH.two), \p2 = (FI.center) in (\x1,\y2) -- (FI); | |
\end{tikzpicture} | |
\\[.25cm] | |
Continued... | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {17}; | |
\node[list,on chain] (FB) {18}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 1}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {,25, , } | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 7] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 11] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 10] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.21 [.24 ] [.23 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\node[list,on chain] (FH) {14}; | |
\node[list,on chain] (FI) {15}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\draw[*->] let \p1 = (FG.two), \p2 = (FH.center) in (\x1,\y2) -- (FH); | |
\draw[*->] let \p1 = (FH.two), \p2 = (FI.center) in (\x1,\y2) -- (FI); | |
\end{tikzpicture} | |
\\[.25cm] | |
Continued... | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {17}; | |
\node[list,on chain] (FB) {18}; | |
\node[list,on chain] (FC) {19}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Iterative Step\\ {\large Min belonged to array 2}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {, , , } | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 7] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 11] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 10] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
\Tree [.23 [.24 ] [.25 ] ] | |
] | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\node[list,on chain] (FH) {14}; | |
\node[list,on chain] (FI) {15}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\draw[*->] let \p1 = (FG.two), \p2 = (FH.center) in (\x1,\y2) -- (FH); | |
\draw[*->] let \p1 = (FH.two), \p2 = (FI.center) in (\x1,\y2) -- (FI); | |
\end{tikzpicture} | |
\\[.25cm] | |
Continued... | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {17}; | |
\node[list,on chain] (FB) {18}; | |
\node[list,on chain] (FC) {19}; | |
\node[list,on chain] (FD) {21}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\end{tikzpicture} | |
\section[Section Title. Section Subtitle]{Terminating Step (Lists empty)\\ {\large Extract Min Until Heap Empty}} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {, , , } | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*1cm) { \n}; } | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 13] (AD) {}; | |
\draw (AD.north east) -- (AD.south west); | |
\draw (AD.north west) -- (AD.south east); | |
\draw[-latex] (8.east) -- (AA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 7] (BD) {}; | |
\draw (BD.north east) -- (BD.south west); | |
\draw (BD.north west) -- (BD.south east); | |
\draw[-latex] (7.east) -- (BA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 11] (CD) {}; | |
\draw (CD.north east) -- (CD.south west); | |
\draw (CD.north west) -- (CD.south east); | |
\draw[-latex] (11.east) -- (CA.west); | |
\node[on chain,draw,inner sep=6pt, right=.5cm of 10] (DD) {}; | |
\draw (DD.north east) -- (DD.south west); | |
\draw (DD.north west) -- (DD.south east); | |
\draw[-latex] (10.east) -- (DA.west); | |
\end{tikzpicture} | |
\\[.5cm] | |
\begin{tikzpicture} | |
\end{tikzpicture} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {7}; | |
\node[list,on chain] (FB) {8}; | |
\node[list,on chain] (FC) {9}; | |
\node[list,on chain] (FD) {10}; | |
\node[list,on chain] (FE) {11}; | |
\node[list,on chain] (FF) {12}; | |
\node[list,on chain] (FG) {13}; | |
\node[list,on chain] (FH) {14}; | |
\node[list,on chain] (FI) {15}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\draw[*->] let \p1 = (FG.two), \p2 = (FH.center) in (\x1,\y2) -- (FH); | |
\draw[*->] let \p1 = (FH.two), \p2 = (FI.center) in (\x1,\y2) -- (FI); | |
\end{tikzpicture} | |
\\[.25cm] | |
Continued... | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\node[list,on chain] (FA) {17}; | |
\node[list,on chain] (FB) {18}; | |
\node[list,on chain] (FC) {19}; | |
\node[list,on chain] (FD) {21}; | |
\node[list,on chain] (FE) {23}; | |
\node[list,on chain] (FF) {24}; | |
\node[list,on chain] (FG) {25}; | |
\draw[*->] let \p1 = (FA.two), \p2 = (FB.center) in (\x1,\y2) -- (FB); | |
\draw[*->] let \p1 = (FB.two), \p2 = (FC.center) in (\x1,\y2) -- (FC); | |
\draw[*->] let \p1 = (FC.two), \p2 = (FD.center) in (\x1,\y2) -- (FD); | |
\draw[*->] let \p1 = (FD.two), \p2 = (FE.center) in (\x1,\y2) -- (FE); | |
\draw[*->] let \p1 = (FE.two), \p2 = (FF.center) in (\x1,\y2) -- (FF); | |
\draw[*->] let \p1 = (FF.two), \p2 = (FG.center) in (\x1,\y2) -- (FG); | |
\end{tikzpicture} | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\usetikzlibrary{calc,shapes.multipart,chains,arrows} | |
\begin{document} | |
\begin{tikzpicture} | |
\node[draw, text badly centered, text width=1cm,minimum size=1cm] (a) {1}; | |
\node[draw, text badly centered, text width=1cm,minimum size=1cm,below=0 of a] (b) {2}; | |
\node[draw, text badly centered, text width=1cm,minimum size=1cm,below=0 of b] (c) {3}; | |
\end{tikzpicture} | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\usetikzlibrary{calc,shapes.multipart,chains,arrows} | |
\begin{document} | |
\begin{tikzpicture} | |
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain] | |
\foreach \n [count=\i from 0] in {4,3,2,1} | |
{\node [draw,minimum width =1cm,minimum height=2ex](\n) at (0,\i*.5 cm) { \n}; } | |
\node[list,on chain, right=2 cm of 1] (A) {12}; | |
\node[list,on chain] (B) {99}; | |
\node[list,on chain] (C) {37}; | |
\node[on chain,draw,inner sep=6pt] (D) {}; | |
\draw (D.north east) -- (D.south west); | |
\draw (D.north west) -- (D.south east); | |
\draw[*->] let \p1 = (A.two), \p2 = (A.center) in (\x1,\y2) -- (B); | |
\draw[*->] let \p1 = (B.two), \p2 = (B.center) in (\x1,\y2) -- (C); | |
\draw[*->] let \p1 = (C.two), \p2 = (C.center) in (\x1,\y2) -- (D); | |
\draw[-latex] (1.east) -- (A.west); | |
\end{tikzpicture} | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{tikzpicture} | |
\Tree [.9 [.8 [.6 ] [.7 ] ] | |
] | |
\end{tikzpicture} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment