Chalarangelo/30-seconds-of-code

View on GitHub
public/assets/illustrations/ds-binary-tree.svg

Summary

Maintainability
Test Coverage
<svg width="800" height="381" viewBox="0 0 800 381" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="317" y="41" width="80" height="80" rx="4" fill="#161632"/>
<path d="M334.653 96H329.994L340.463 66.9091H345.534L356.003 96H351.344L343.119 72.1932H342.892L334.653 96ZM335.435 84.608H350.548V88.3011H335.435V84.608ZM360.204 96V66.9091H370.857C372.922 66.9091 374.631 67.25 375.985 67.9318C377.339 68.6042 378.353 69.518 379.025 70.6733C379.697 71.8191 380.033 73.1117 380.033 74.5511C380.033 75.7633 379.811 76.786 379.366 77.6193C378.921 78.4432 378.324 79.1061 377.576 79.608C376.837 80.1004 376.023 80.4602 375.133 80.6875V80.9716C376.099 81.0189 377.041 81.3314 377.96 81.9091C378.888 82.4773 379.655 83.2869 380.261 84.3381C380.867 85.3892 381.17 86.6676 381.17 88.1733C381.17 89.66 380.819 90.9953 380.119 92.179C379.427 93.3532 378.357 94.286 376.908 94.9773C375.46 95.6591 373.608 96 371.354 96H360.204ZM364.593 92.2358H370.928C373.031 92.2358 374.536 91.8286 375.445 91.0142C376.354 90.1998 376.809 89.1818 376.809 87.9602C376.809 87.0417 376.577 86.1989 376.113 85.4318C375.649 84.6648 374.986 84.054 374.124 83.5994C373.272 83.1449 372.259 82.9176 371.085 82.9176H364.593V92.2358ZM364.593 79.4943H370.474C371.459 79.4943 372.344 79.3049 373.13 78.9261C373.925 78.5473 374.555 78.017 375.019 77.3352C375.493 76.6439 375.729 75.8295 375.729 74.892C375.729 73.6894 375.308 72.6809 374.465 71.8665C373.622 71.0521 372.33 70.6449 370.587 70.6449H364.593V79.4943Z" fill="#E3E3E8"/>
<path d="M325.886 46.3636V58H324.824V47.4773H324.756L322.028 49.2898V48.1875L324.778 46.3636H325.886Z" fill="#E3E3E8"/>
<rect x="193" y="165" width="80" height="80" rx="4" fill="#161632"/>
<path d="M209.653 220H204.994L215.463 190.909H220.534L231.003 220H226.344L218.119 196.193H217.892L209.653 220ZM210.435 208.608H225.548V212.301H210.435V208.608ZM257.999 200.369H253.567C253.396 199.422 253.079 198.589 252.615 197.869C252.151 197.15 251.583 196.539 250.911 196.037C250.238 195.535 249.485 195.156 248.652 194.901C247.828 194.645 246.952 194.517 246.024 194.517C244.348 194.517 242.847 194.938 241.521 195.781C240.205 196.624 239.163 197.86 238.396 199.489C237.639 201.117 237.26 203.106 237.26 205.455C237.26 207.822 237.639 209.82 238.396 211.449C239.163 213.078 240.21 214.309 241.536 215.142C242.861 215.975 244.353 216.392 246.01 216.392C246.929 216.392 247.8 216.269 248.624 216.023C249.457 215.767 250.21 215.393 250.882 214.901C251.554 214.408 252.123 213.807 252.587 213.097C253.06 212.377 253.387 211.553 253.567 210.625L257.999 210.639C257.762 212.069 257.303 213.385 256.621 214.588C255.948 215.781 255.082 216.813 254.021 217.685C252.97 218.546 251.768 219.214 250.413 219.688C249.059 220.161 247.582 220.398 245.982 220.398C243.463 220.398 241.218 219.801 239.249 218.608C237.279 217.405 235.726 215.687 234.589 213.452C233.463 211.217 232.899 208.551 232.899 205.455C232.899 202.348 233.467 199.683 234.604 197.457C235.74 195.223 237.293 193.509 239.263 192.315C241.232 191.113 243.472 190.511 245.982 190.511C247.525 190.511 248.964 190.734 250.3 191.179C251.644 191.615 252.852 192.259 253.922 193.111C254.992 193.954 255.877 194.986 256.578 196.207C257.279 197.42 257.752 198.807 257.999 200.369Z" fill="#E3E3E8"/>
<path d="M201.886 170.364V182H200.824V171.477H200.756L198.028 173.29V172.188L200.778 170.364H201.886ZM209.011 170.364V182H207.949V171.477H207.881L205.153 173.29V172.188L207.903 170.364H209.011Z" fill="#E3E3E8"/>
<rect x="441" y="165" width="80" height="80" rx="4" fill="#161632"/>
<path d="M456.196 220V190.909H466.849C468.914 190.909 470.623 191.25 471.977 191.932C473.331 192.604 474.345 193.518 475.017 194.673C475.689 195.819 476.026 197.112 476.026 198.551C476.026 199.763 475.803 200.786 475.358 201.619C474.913 202.443 474.316 203.106 473.568 203.608C472.83 204.1 472.015 204.46 471.125 204.688V204.972C472.091 205.019 473.033 205.331 473.952 205.909C474.88 206.477 475.647 207.287 476.253 208.338C476.859 209.389 477.162 210.668 477.162 212.173C477.162 213.66 476.812 214.995 476.111 216.179C475.42 217.353 474.349 218.286 472.901 218.977C471.452 219.659 469.6 220 467.347 220H456.196ZM460.585 216.236H466.92C469.023 216.236 470.528 215.829 471.438 215.014C472.347 214.2 472.801 213.182 472.801 211.96C472.801 211.042 472.569 210.199 472.105 209.432C471.641 208.665 470.978 208.054 470.116 207.599C469.264 207.145 468.251 206.918 467.077 206.918H460.585V216.236ZM460.585 203.494H466.466C467.451 203.494 468.336 203.305 469.122 202.926C469.918 202.547 470.547 202.017 471.011 201.335C471.485 200.644 471.722 199.83 471.722 198.892C471.722 197.689 471.3 196.681 470.457 195.866C469.615 195.052 468.322 194.645 466.58 194.645H460.585V203.494ZM506.53 200.369H502.098C501.928 199.422 501.61 198.589 501.146 197.869C500.682 197.15 500.114 196.539 499.442 196.037C498.769 195.535 498.017 195.156 497.183 194.901C496.359 194.645 495.483 194.517 494.555 194.517C492.879 194.517 491.378 194.938 490.053 195.781C488.736 196.624 487.695 197.86 486.928 199.489C486.17 201.117 485.791 203.106 485.791 205.455C485.791 207.822 486.17 209.82 486.928 211.449C487.695 213.078 488.741 214.309 490.067 215.142C491.393 215.975 492.884 216.392 494.541 216.392C495.46 216.392 496.331 216.269 497.155 216.023C497.988 215.767 498.741 215.393 499.413 214.901C500.086 214.408 500.654 213.807 501.118 213.097C501.591 212.377 501.918 211.553 502.098 210.625L506.53 210.639C506.293 212.069 505.834 213.385 505.152 214.588C504.48 215.781 503.613 216.813 502.553 217.685C501.501 218.546 500.299 219.214 498.945 219.688C497.59 220.161 496.113 220.398 494.513 220.398C491.994 220.398 489.75 219.801 487.78 218.608C485.81 217.405 484.257 215.687 483.121 213.452C481.994 211.217 481.43 208.551 481.43 205.455C481.43 202.348 481.999 199.683 483.135 197.457C484.271 195.223 485.824 193.509 487.794 192.315C489.764 191.113 492.003 190.511 494.513 190.511C496.056 190.511 497.496 190.734 498.831 191.179C500.176 191.615 501.383 192.259 502.453 193.111C503.523 193.954 504.409 194.986 505.109 196.207C505.81 197.42 506.284 198.807 506.53 200.369Z" fill="#E3E3E8"/>
<path d="M449.886 170.364V182H448.824V171.477H448.756L446.028 173.29V172.188L448.778 170.364H449.886ZM453.42 182V181.222L457.222 176.949C457.718 176.388 458.117 175.909 458.42 175.511C458.723 175.114 458.943 174.746 459.08 174.409C459.22 174.072 459.29 173.722 459.29 173.358C459.29 172.915 459.186 172.528 458.977 172.199C458.773 171.866 458.491 171.606 458.131 171.42C457.771 171.235 457.366 171.142 456.915 171.142C456.438 171.142 456.019 171.244 455.659 171.449C455.303 171.653 455.027 171.934 454.83 172.29C454.633 172.646 454.534 173.055 454.534 173.517H453.517C453.517 172.873 453.665 172.303 453.96 171.807C454.259 171.307 454.667 170.915 455.182 170.631C455.701 170.347 456.288 170.205 456.943 170.205C457.591 170.205 458.167 170.345 458.67 170.625C459.174 170.902 459.57 171.278 459.858 171.756C460.146 172.233 460.29 172.767 460.29 173.358C460.29 173.786 460.214 174.201 460.062 174.602C459.915 175.004 459.659 175.451 459.295 175.943C458.932 176.436 458.428 177.038 457.784 177.75L454.898 180.972V181.045H460.653V182H453.42Z" fill="#E3E3E8"/>
<rect x="566" y="289" width="80" height="80" rx="4" fill="#161632"/>
<path d="M580.196 344V314.909H590.849C592.914 314.909 594.623 315.25 595.977 315.932C597.331 316.604 598.345 317.518 599.017 318.673C599.689 319.819 600.026 321.112 600.026 322.551C600.026 323.763 599.803 324.786 599.358 325.619C598.913 326.443 598.316 327.106 597.568 327.608C596.83 328.1 596.015 328.46 595.125 328.688V328.972C596.091 329.019 597.033 329.331 597.952 329.909C598.88 330.477 599.647 331.287 600.253 332.338C600.859 333.389 601.162 334.668 601.162 336.173C601.162 337.66 600.812 338.995 600.111 340.179C599.42 341.353 598.349 342.286 596.901 342.977C595.452 343.659 593.6 344 591.347 344H580.196ZM584.585 340.236H590.92C593.023 340.236 594.528 339.829 595.438 339.014C596.347 338.2 596.801 337.182 596.801 335.96C596.801 335.042 596.569 334.199 596.105 333.432C595.641 332.665 594.978 332.054 594.116 331.599C593.264 331.145 592.251 330.918 591.077 330.918H584.585V340.236ZM584.585 327.494H590.466C591.451 327.494 592.336 327.305 593.122 326.926C593.918 326.547 594.547 326.017 595.011 325.335C595.485 324.644 595.722 323.83 595.722 322.892C595.722 321.689 595.3 320.681 594.457 319.866C593.615 319.052 592.322 318.645 590.58 318.645H584.585V327.494ZM626.055 324.099C625.781 323.238 625.411 322.466 624.947 321.784C624.493 321.093 623.948 320.506 623.314 320.023C622.679 319.53 621.955 319.156 621.141 318.901C620.336 318.645 619.45 318.517 618.484 318.517C616.846 318.517 615.369 318.938 614.053 319.781C612.736 320.624 611.695 321.86 610.928 323.489C610.17 325.108 609.791 327.092 609.791 329.44C609.791 331.798 610.175 333.792 610.942 335.42C611.709 337.049 612.76 338.285 614.095 339.128C615.43 339.971 616.95 340.392 618.655 340.392C620.236 340.392 621.614 340.07 622.788 339.426C623.972 338.782 624.886 337.873 625.53 336.699C626.183 335.515 626.51 334.123 626.51 332.523L627.646 332.736H619.322V329.114H630.757V332.423C630.757 334.866 630.236 336.988 629.195 338.787C628.162 340.577 626.732 341.959 624.905 342.935C623.087 343.91 621.003 344.398 618.655 344.398C616.022 344.398 613.712 343.792 611.723 342.58C609.744 341.367 608.2 339.649 607.092 337.423C605.984 335.188 605.43 332.537 605.43 329.469C605.43 327.149 605.752 325.065 606.396 323.219C607.04 321.372 607.945 319.805 609.109 318.517C610.284 317.22 611.661 316.23 613.243 315.548C614.834 314.857 616.571 314.511 618.456 314.511C620.028 314.511 621.491 314.743 622.845 315.207C624.209 315.671 625.421 316.33 626.482 317.182C627.552 318.034 628.437 319.047 629.138 320.222C629.839 321.386 630.312 322.679 630.558 324.099H626.055Z" fill="#E3E3E8"/>
<path d="M574.886 294.364V306H573.824V295.477H573.756L571.028 297.29V296.188L573.778 294.364H574.886ZM578.42 306V305.222L582.222 300.949C582.718 300.388 583.117 299.909 583.42 299.511C583.723 299.114 583.943 298.746 584.08 298.409C584.22 298.072 584.29 297.722 584.29 297.358C584.29 296.915 584.186 296.528 583.977 296.199C583.773 295.866 583.491 295.606 583.131 295.42C582.771 295.235 582.366 295.142 581.915 295.142C581.438 295.142 581.019 295.244 580.659 295.449C580.303 295.653 580.027 295.934 579.83 296.29C579.633 296.646 579.534 297.055 579.534 297.517H578.517C578.517 296.873 578.665 296.303 578.96 295.807C579.259 295.307 579.667 294.915 580.182 294.631C580.701 294.347 581.288 294.205 581.943 294.205C582.591 294.205 583.167 294.345 583.67 294.625C584.174 294.902 584.57 295.278 584.858 295.756C585.146 296.233 585.29 296.767 585.29 297.358C585.29 297.786 585.214 298.201 585.062 298.602C584.915 299.004 584.659 299.451 584.295 299.943C583.932 300.436 583.428 301.038 582.784 301.75L579.898 304.972V305.045H585.653V306H578.42ZM591.777 294.364V306H590.714V295.477H590.646L587.919 297.29V296.188L590.669 294.364H591.777Z" fill="#E3E3E8"/>
<path d="M396.061 117.939C395.475 117.354 394.525 117.354 393.939 117.939C393.354 118.525 393.354 119.475 393.939 120.061L396.061 117.939ZM445 169L440.517 152.27L428.27 164.517L445 169ZM393.939 120.061L434.393 160.515L436.515 158.393L396.061 117.939L393.939 120.061Z" fill="#E3E3E8"/>
<path d="M320.061 120.061C320.646 119.475 320.646 118.525 320.061 117.939C319.475 117.354 318.525 117.354 317.939 117.939L320.061 120.061ZM269 169L285.73 164.517L273.483 152.27L269 169ZM317.939 117.939L277.485 158.393L279.607 160.515L320.061 120.061L317.939 117.939Z" fill="#E3E3E8"/>
<path d="M520.061 241.939C519.475 241.354 518.525 241.354 517.939 241.939C517.354 242.525 517.354 243.475 517.939 244.061L520.061 241.939ZM569 293L564.517 276.27L552.27 288.517L569 293ZM517.939 244.061L558.393 284.515L560.515 282.393L520.061 241.939L517.939 244.061Z" fill="#E3E3E8"/>
<path d="M326.003 35V21.9091H327.477V23.9205H327.588C327.849 23.2614 328.304 22.7301 328.952 22.3267C329.605 21.9176 330.344 21.7131 331.168 21.7131C331.293 21.7131 331.432 21.7159 331.585 21.7216C331.739 21.7273 331.866 21.733 331.969 21.7386V23.2812C331.901 23.2699 331.781 23.2528 331.611 23.2301C331.44 23.2074 331.256 23.196 331.057 23.196C330.375 23.196 329.767 23.3409 329.233 23.6307C328.705 23.9148 328.287 24.3097 327.98 24.8153C327.673 25.321 327.52 25.8977 327.52 26.5455V35H326.003ZM339.247 35.2727C338.116 35.2727 337.116 34.9858 336.247 34.4119C335.384 33.8381 334.707 33.0455 334.219 32.0341C333.73 31.017 333.486 29.8437 333.486 28.5142C333.486 27.1733 333.73 25.9943 334.219 24.9773C334.707 23.9545 335.384 23.1591 336.247 22.5909C337.116 22.017 338.116 21.7301 339.247 21.7301C340.378 21.7301 341.375 22.017 342.239 22.5909C343.102 23.1648 343.778 23.9602 344.267 24.9773C344.761 25.9943 345.009 27.1733 345.009 28.5142C345.009 29.8437 344.764 31.017 344.276 32.0341C343.787 33.0455 343.108 33.8381 342.239 34.4119C341.375 34.9858 340.378 35.2727 339.247 35.2727ZM339.247 33.8835C340.156 33.8835 340.926 33.6392 341.557 33.1506C342.188 32.6619 342.665 32.0114 342.989 31.1989C343.318 30.3864 343.483 29.4915 343.483 28.5142C343.483 27.5369 343.318 26.6392 342.989 25.821C342.665 25.0028 342.188 24.3466 341.557 23.8523C340.926 23.358 340.156 23.1108 339.247 23.1108C338.344 23.1108 337.574 23.358 336.938 23.8523C336.307 24.3466 335.827 25.0028 335.497 25.821C335.173 26.6392 335.011 27.5369 335.011 28.5142C335.011 29.4915 335.173 30.3864 335.497 31.1989C335.827 32.0114 336.307 32.6619 336.938 33.1506C337.568 33.6392 338.338 33.8835 339.247 33.8835ZM353.427 35.2727C352.296 35.2727 351.296 34.9858 350.427 34.4119C349.563 33.8381 348.887 33.0455 348.398 32.0341C347.91 31.017 347.665 29.8437 347.665 28.5142C347.665 27.1733 347.91 25.9943 348.398 24.9773C348.887 23.9545 349.563 23.1591 350.427 22.5909C351.296 22.017 352.296 21.7301 353.427 21.7301C354.558 21.7301 355.555 22.017 356.418 22.5909C357.282 23.1648 357.958 23.9602 358.447 24.9773C358.941 25.9943 359.188 27.1733 359.188 28.5142C359.188 29.8437 358.944 31.017 358.455 32.0341C357.967 33.0455 357.288 33.8381 356.418 34.4119C355.555 34.9858 354.558 35.2727 353.427 35.2727ZM353.427 33.8835C354.336 33.8835 355.106 33.6392 355.737 33.1506C356.367 32.6619 356.844 32.0114 357.168 31.1989C357.498 30.3864 357.663 29.4915 357.663 28.5142C357.663 27.5369 357.498 26.6392 357.168 25.821C356.844 25.0028 356.367 24.3466 355.737 23.8523C355.106 23.358 354.336 23.1108 353.427 23.1108C352.523 23.1108 351.754 23.358 351.117 23.8523C350.487 24.3466 350.006 25.0028 349.677 25.821C349.353 26.6392 349.191 27.5369 349.191 28.5142C349.191 29.4915 349.353 30.3864 349.677 31.1989C350.006 32.0114 350.487 32.6619 351.117 33.1506C351.748 33.6392 352.518 33.8835 353.427 33.8835ZM367.675 21.9091V23.2301H361.428V21.9091H367.675ZM363.379 18.7727H364.905V31.5824C364.905 32.1278 364.999 32.5568 365.186 32.8693C365.374 33.1761 365.618 33.3949 365.919 33.5256C366.22 33.6506 366.541 33.7131 366.882 33.7131C367.081 33.7131 367.251 33.7017 367.393 33.679C367.536 33.6506 367.661 33.6222 367.768 33.5938L368.092 34.9659C367.945 35.0227 367.763 35.0739 367.547 35.1193C367.331 35.1705 367.064 35.196 366.746 35.196C366.189 35.196 365.652 35.0739 365.135 34.8295C364.624 34.5852 364.203 34.2216 363.874 33.7386C363.544 33.2557 363.379 32.6562 363.379 31.9403V18.7727Z" fill="#C7C7D1"/>
</svg>