images to svg
|
Before Width: | Height: | Size: 15 KiB |
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="640px" height="225px" viewBox="0 0 640 225" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 55.2 (78181) - https://sketchapp.com -->
|
||||
<title>fibonacci-recursion-tree.svg</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<g id="combined" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="fibonacci-recursion-tree.svg">
|
||||
<text id="fib(5)" font-family="Consolas" font-size="14" font-weight="normal">
|
||||
<tspan x="355" y="11" fill="#000000">fib</tspan>
|
||||
<tspan x="378.091797" y="11" fill="#999999">(</tspan>
|
||||
<tspan x="385.789062" y="11" fill="#000000">5</tspan>
|
||||
<tspan x="393.486328" y="11" fill="#999999">)</tspan>
|
||||
</text>
|
||||
<path id="Line-Copy-4" d="M494.818022,45.3689512 L412.251608,20.1644669 L412.835533,18.2516076 L495.401947,43.4560918 L497.153724,37.7175137 L508.5,48.5 L493.066245,51.1075294 L494.818022,45.3689512 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-18" d="M266.510054,43.2332664 L343.643062,18.2404482 L344.259552,20.1430623 L267.126544,45.1358805 L268.976012,50.843723 L253.5,48.5 L264.660586,37.5254238 L266.510054,43.2332664 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-13" d="M170.047093,139.386374 L152.092534,124.637987 L153.362013,123.092534 L171.316572,137.840922 L175.125008,133.204564 L181.5,147.5 L166.238656,144.022732 L170.047093,139.386374 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-14" d="M512.047093,139.386374 L494.092534,124.637987 L495.362013,123.092534 L513.316572,137.840922 L517.125008,133.204564 L523.5,147.5 L508.238656,144.022732 L512.047093,139.386374 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-17" d="M443.359568,137.290627 L458.022445,123.085965 L459.414035,124.522445 L444.751158,138.727107 L448.92593,143.036549 L434,147.75 L439.184797,132.981185 L443.359568,137.290627 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-20" d="M265.359568,137.290627 L280.022445,123.085965 L281.414035,124.522445 L266.751158,138.727107 L270.92593,143.036549 L256,147.75 L261.184797,132.981185 L265.359568,137.290627 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-21" d="M95.3595679,137.290627 L110.022445,123.085965 L111.414035,124.522445 L96.7511583,138.727107 L100.92593,143.036549 L86,147.75 L91.1847966,132.981185 L95.3595679,137.290627 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-15" d="M337.047093,139.386374 L319.092534,124.637987 L320.362013,123.092534 L338.316572,137.840922 L342.125008,133.204564 L348.5,147.5 L333.238656,144.022732 L337.047093,139.386374 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-16" d="M107.047093,190.386374 L89.0925343,175.637987 L90.3620132,174.092534 L108.316572,188.840922 L112.125008,184.204564 L118.5,198.5 L103.238656,195.022732 L107.047093,190.386374 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-22" d="M40.6834281,188.840922 L58.6379868,174.092534 L59.9074657,175.637987 L41.952907,190.386374 L45.7613435,195.022732 L30.5,198.5 L36.8749916,184.204564 L40.6834281,188.840922 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-8" d="M277.442455,93.3521335 L241.166064,75.9696958 L242.030304,74.1660638 L278.306696,91.5485014 L280.899417,86.1376053 L290.5,98.5 L274.849734,98.7630297 L277.442455,93.3521335 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-9" d="M581.442455,93.3521335 L545.166064,75.9696958 L546.030304,74.1660638 L582.306696,91.5485014 L584.899417,86.1376053 L594.5,98.5 L578.849734,98.7630297 L581.442455,93.3521335 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-7" d="M498.336665,90.9572304 L529.403523,74.1445778 L530.355422,75.9035227 L499.288564,92.7161753 L502.144263,97.99301 L486.5,98.5 L495.480966,85.6803957 L498.336665,90.9572304 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<path id="Line-Copy-19" d="M164.336665,90.9572304 L195.403523,74.1445778 L196.355422,75.9035227 L165.288564,92.7161753 L168.144263,97.99301 L152.5,98.5 L161.480966,85.6803957 L164.336665,90.9572304 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="fib(4)" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="198" y="68">fib(4)</tspan>
|
||||
</text>
|
||||
<text id="fib(3)" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="518" y="68">fib(3)</tspan>
|
||||
</text>
|
||||
<text id="fib(3)" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="111" y="117">fib(3)</tspan>
|
||||
</text>
|
||||
<text id="fib(2)" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="277" y="117">fib(2)</tspan>
|
||||
</text>
|
||||
<text id="fib(0)" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="328" y="164">fib(0)</tspan>
|
||||
</text>
|
||||
<text id="fib(1)" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="239" y="164">fib(1)</tspan>
|
||||
</text>
|
||||
<text id="fib(1)" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="164" y="164">fib(1)</tspan>
|
||||
</text>
|
||||
<text id="fib(2)-copy-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="456" y="117">fib(2)</tspan>
|
||||
</text>
|
||||
<text id="fib(0)-copy-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="514" y="164">fib(0)</tspan>
|
||||
</text>
|
||||
<text id="fib(1)-copy-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="409" y="164">fib(1)</tspan>
|
||||
</text>
|
||||
<text id="fib(1)-copy-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="580" y="117">fib(1)</tspan>
|
||||
</text>
|
||||
<text id="fib(2)-copy" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="54" y="164">fib(2)</tspan>
|
||||
</text>
|
||||
<text id="fib(0)-copy" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="102" y="218">fib(0)</tspan>
|
||||
</text>
|
||||
<text id="fib(1)-copy" font-family="Consolas" font-size="14" font-weight="normal" fill="#000000">
|
||||
<tspan x="5" y="219">fib(1)</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
|
@ -29,7 +29,7 @@ Here we can see that the value of `fib(3)` is needed for both `fib(5)` and `fib(
|
|||
|
||||
Here's the full recursion tree:
|
||||
|
||||

|
||||

|
||||
|
||||
We can clearly notice that `fib(3)` is evaluated two times and `fib(2)` is evaluated three times. The total amount of computations grows much faster than `n`, making it enormous even for `n=77`.
|
||||
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ The code is short and easy to understand (hopefully?). That's the power of recur
|
|||
|
||||
Here's the diagram of calls:
|
||||
|
||||

|
||||

|
||||
|
||||
We can easily see the principle: for an object `{...}` subcalls are made, while arrays `[...]` are the "leaves" of the recursion tree, they give immediate result.
|
||||
|
||||
|
|
@ -444,7 +444,7 @@ let list = {
|
|||
|
||||
Graphical representation of the list:
|
||||
|
||||

|
||||

|
||||
|
||||
An alternative code for creation:
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ let secondList = list.next.next;
|
|||
list.next.next = null;
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
To join:
|
||||
|
||||
|
|
@ -488,7 +488,7 @@ list = { value: "new item", next: list };
|
|||
*/!*
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
To remove a value from the middle, change `next` of the previous one:
|
||||
|
||||
|
|
@ -496,7 +496,7 @@ To remove a value from the middle, change `next` of the previous one:
|
|||
list.next = list.next.next;
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
We made `list.next` jump over `1` to value `2`. The value `1` is now excluded from the chain. If it's not stored anywhere else, it will be automatically removed from the memory.
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 6.6 KiB |
71
1-js/06-advanced-functions/01-recursion/linked-list-0.svg
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="816px" height="108px" viewBox="0 0 816 108" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 55.2 (78181) - https://sketchapp.com -->
|
||||
<title>linked-list-0.svg</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<g id="combined" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="linked-list-0.svg">
|
||||
<rect id="Rectangle-15" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="219" y="61" width="78" height="32"></rect>
|
||||
<text id="value" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="221" y="51">value</tspan>
|
||||
</text>
|
||||
<text id="-8" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="253" y="81">1</tspan>
|
||||
</text>
|
||||
<path id="Line-21" d="M341.27,77 L282.73,77 L282.73,75 L341.27,75 L341.27,69 L355.27,76 L341.27,83 L341.27,77 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="307" y="65">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-15-Copy" stroke="#EE6B47" stroke-width="2" fill="#FFF9EB" x="48" y="61" width="93" height="32"></rect>
|
||||
<text id="value-copy" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="50" y="51">value</tspan>
|
||||
</text>
|
||||
<text id=""new-item"" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="56" y="79">"new item"</tspan>
|
||||
</text>
|
||||
<path id="Line-21-Copy" d="M200.27,77 L141.73,77 L141.73,75 L200.27,75 L200.27,69 L214.27,76 L200.27,83 L200.27,77 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-copy" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="166" y="65">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-11" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="359" y="61" width="78" height="32"></rect>
|
||||
<text id="value-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="361" y="51">value</tspan>
|
||||
</text>
|
||||
<text id="-9" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="393" y="81">2</tspan>
|
||||
</text>
|
||||
<path id="Line-22" d="M481.27,77 L422.73,77 L422.73,75 L481.27,75 L481.27,69 L495.27,76 L481.27,83 L481.27,77 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="447" y="65">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-13" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="498" y="61" width="78" height="32"></rect>
|
||||
<text id="value-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="500" y="51">value</tspan>
|
||||
</text>
|
||||
<text id="-10" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="532" y="81">3</tspan>
|
||||
</text>
|
||||
<path id="Line-23" d="M620.27,77 L561.73,77 L561.73,75 L620.27,75 L620.27,69 L634.27,76 L620.27,83 L620.27,77 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="586" y="65">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-14" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="638" y="61" width="78" height="32"></rect>
|
||||
<text id="value-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="640" y="51">value</tspan>
|
||||
</text>
|
||||
<text id="4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="672" y="81">4</tspan>
|
||||
</text>
|
||||
<path id="Line-24" d="M760.27,77 L701.73,77 L701.73,75 L760.27,75 L760.27,69 L774.27,76 L760.27,83 L760.27,77 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="726" y="65">next</tspan>
|
||||
</text>
|
||||
<text id="null" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="782" y="80">null</tspan>
|
||||
</text>
|
||||
<text id="list" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="8" y="80">list</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="670px" height="143px" viewBox="0 0 670 143" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 55.2 (78181) - https://sketchapp.com -->
|
||||
<title>linked-list-remove-1.svg</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<g id="combined" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="linked-list-remove-1.svg">
|
||||
<rect id="Rectangle-15" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="47" y="30" width="90" height="32"></rect>
|
||||
<text id="value" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="43" y="20">value</tspan>
|
||||
</text>
|
||||
<text id=""new-item"" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="54" y="48">"new item"</tspan>
|
||||
</text>
|
||||
<path id="Line-21" d="M190.27,46 L131.73,46 L131.73,44 L190.27,44 L190.27,38 L204.27,45 L190.27,52 L190.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="156" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-15-Copy" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" opacity="0.6" x="117" y="104" width="78" height="32"></rect>
|
||||
<text id="value-copy" opacity="0.6" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="118" y="94">value</tspan>
|
||||
</text>
|
||||
<text id="1" opacity="0.6" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="149" y="124">1</tspan>
|
||||
</text>
|
||||
<path id="Line-21-Copy" d="M219.821975,85.6654238 L181.663909,120.412668 L180.317332,118.933909 L218.475398,84.1866647 L214.435664,79.7503875 L229.5,75.5 L223.861709,90.101701 L219.821975,85.6654238 Z" fill="#EE6B47" fill-rule="nonzero" opacity="0.6"></path>
|
||||
<text id="next-copy" opacity="0.6" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="214" y="108">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-11" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="208" y="30" width="78" height="32"></rect>
|
||||
<text id="value-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="210" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="-9" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="242" y="50">2</tspan>
|
||||
</text>
|
||||
<path id="Line-22" d="M330.27,46 L271.73,46 L271.73,44 L330.27,44 L330.27,38 L344.27,45 L330.27,52 L330.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="296" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-13" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="347" y="30" width="78" height="32"></rect>
|
||||
<text id="value-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="349" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="-10" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="381" y="50">3</tspan>
|
||||
</text>
|
||||
<path id="Line-23" d="M469.27,46 L410.73,46 L410.73,44 L469.27,44 L469.27,38 L483.27,45 L469.27,52 L469.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="435" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-14" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="487" y="30" width="78" height="32"></rect>
|
||||
<text id="value-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="489" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="521" y="50">4</tspan>
|
||||
</text>
|
||||
<path id="Line-24" d="M609.27,46 L550.73,46 L550.73,44 L609.27,44 L609.27,38 L623.27,45 L609.27,52 L609.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="575" y="34">next</tspan>
|
||||
</text>
|
||||
<text id="null" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="631" y="49">null</tspan>
|
||||
</text>
|
||||
<text id="list" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="8" y="49">list</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="409px" height="150px" viewBox="0 0 409 150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 55.2 (78181) - https://sketchapp.com -->
|
||||
<title>linked-list-split.svg</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<g id="combined" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="linked-list-split.svg">
|
||||
<rect id="Rectangle-15" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="88" y="30" width="78" height="32"></rect>
|
||||
<text id="value" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="90" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="-8" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="122" y="50">1</tspan>
|
||||
</text>
|
||||
<path id="Line-21" d="M210.27,46 L151.73,46 L151.73,44 L210.27,44 L210.27,38 L224.27,45 L210.27,52 L210.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="176" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-11" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="228" y="30" width="78" height="32"></rect>
|
||||
<text id="value-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="230" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="-9" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="262" y="50">2</tspan>
|
||||
</text>
|
||||
<path id="Line-22" d="M350.27,46 L291.73,46 L291.73,44 L350.27,44 L350.27,38 L364.27,45 L350.27,52 L350.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="316" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-13" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="87" y="95" width="78" height="32"></rect>
|
||||
<text id="value-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="89" y="85">value</tspan>
|
||||
</text>
|
||||
<text id="-10" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="121" y="115">3</tspan>
|
||||
</text>
|
||||
<path id="Line-23" d="M209.27,111 L150.73,111 L150.73,109 L209.27,109 L209.27,103 L223.27,110 L209.27,117 L209.27,111 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="175" y="99">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-14" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="227" y="95" width="78" height="32"></rect>
|
||||
<text id="value-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="229" y="85">value</tspan>
|
||||
</text>
|
||||
<text id="4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="261" y="115">4</tspan>
|
||||
</text>
|
||||
<path id="Line-24" d="M349.27,111 L290.73,111 L290.73,109 L349.27,109 L349.27,103 L363.27,110 L349.27,117 L349.27,111 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="315" y="99">next</tspan>
|
||||
</text>
|
||||
<text id="null" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="371" y="114">null</tspan>
|
||||
</text>
|
||||
<text id="null-copy" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="371" y="49">null</tspan>
|
||||
</text>
|
||||
<text id="secondList" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="5" y="114">secondList</tspan>
|
||||
</text>
|
||||
<text id="list" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="50" y="49">list</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
60
1-js/06-advanced-functions/01-recursion/linked-list.svg
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="652px" height="77px" viewBox="0 0 652 77" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 55.2 (78181) - https://sketchapp.com -->
|
||||
<title>linked-list.svg</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<g id="combined" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="linked-list.svg">
|
||||
<rect id="Rectangle-15" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="48" y="30" width="78" height="32"></rect>
|
||||
<text id="value" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="50" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="-8" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="82" y="50">1</tspan>
|
||||
</text>
|
||||
<path id="Line-21" d="M170.27,46 L111.73,46 L111.73,44 L170.27,44 L170.27,38 L184.27,45 L170.27,52 L170.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="136" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-11" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="188" y="30" width="78" height="32"></rect>
|
||||
<text id="value-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="190" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="-9" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="222" y="50">2</tspan>
|
||||
</text>
|
||||
<path id="Line-22" d="M310.27,46 L251.73,46 L251.73,44 L310.27,44 L310.27,38 L324.27,45 L310.27,52 L310.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-2" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="276" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-13" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="327" y="30" width="78" height="32"></rect>
|
||||
<text id="value-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="329" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="-10" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="361" y="50">3</tspan>
|
||||
</text>
|
||||
<path id="Line-23" d="M449.27,46 L390.73,46 L390.73,44 L449.27,44 L449.27,38 L463.27,45 L449.27,52 L449.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-3" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="415" y="34">next</tspan>
|
||||
</text>
|
||||
<rect id="Rectangle-14" stroke="#E8C48E" stroke-width="2" fill="#FFF9EB" x="467" y="30" width="78" height="32"></rect>
|
||||
<text id="value-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="469" y="20">value</tspan>
|
||||
</text>
|
||||
<text id="4" font-family="Consolas" font-size="14" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="501" y="50">4</tspan>
|
||||
</text>
|
||||
<path id="Line-24" d="M589.27,46 L530.73,46 L530.73,44 L589.27,44 L589.27,38 L603.27,45 L589.27,52 L589.27,46 Z" fill="#EE6B47" fill-rule="nonzero"></path>
|
||||
<text id="next-4" font-family="Consolas" font-size="14" font-weight="normal" fill="#EE6B47">
|
||||
<tspan x="555" y="34">next</tspan>
|
||||
</text>
|
||||
<text id="null" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="610" y="49">null</tspan>
|
||||
</text>
|
||||
<text id="list" font-family="Consolas-Italic, Consolas" font-size="14" font-style="italic" font-weight="normal" fill="#8A704D">
|
||||
<tspan x="10" y="49">list</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 267 KiB |
|
Before Width: | Height: | Size: 67 KiB |