Documentation for 95ed72a452

This commit is contained in:
github-actions
2021-10-15 16:44:16 +00:00
parent 567c4ff764
commit 7e9f4857e2
365 changed files with 6848 additions and 4620 deletions

View File

@@ -0,0 +1,12 @@
<map id="cpu_scheduling_algorithms/fcfs_scheduling.cpp" name="cpu_scheduling_algorithms/fcfs_scheduling.cpp">
<area shape="rect" id="node1" title="Implementation of FCFS CPU scheduling algorithm." alt="" coords="301,5,485,47"/>
<area shape="rect" id="node2" title=" " alt="" coords="5,95,83,121"/>
<area shape="rect" id="node3" title=" " alt="" coords="107,95,173,121"/>
<area shape="rect" id="node4" title=" " alt="" coords="197,95,257,121"/>
<area shape="rect" id="node5" title=" " alt="" coords="281,95,335,121"/>
<area shape="rect" id="node6" title=" " alt="" coords="359,95,428,121"/>
<area shape="rect" id="node7" title=" " alt="" coords="453,95,526,121"/>
<area shape="rect" id="node8" title=" " alt="" coords="551,95,609,121"/>
<area shape="rect" id="node9" title=" " alt="" coords="634,95,742,121"/>
<area shape="rect" id="node10" title=" " alt="" coords="767,95,825,121"/>
</map>

View File

@@ -0,0 +1 @@
0324174599ed13b0486f31d316384e99

View File

@@ -0,0 +1,246 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.49.1 (20210923.0004)
-->
<!-- Title: cpu_scheduling_algorithms/fcfs_scheduling.cpp Pages: 1 -->
<!--zoomable 95 -->
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
<style type="text/css"><![CDATA[
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="text/javascript"><![CDATA[
var edges = document.getElementsByTagName('g');
if (edges && edges.length) {
for (var i=0;i<edges.length;i++) {
if (edges[i].id.substr(0,4)=='edge') {
edges[i].setAttribute('class','edge');
}
}
}
]]></script>
<defs>
<circle id="rim" cx="0" cy="0" r="7"/>
<circle id="rim2" cx="0" cy="0" r="3.5"/>
<g id="zoomPlus">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/>
</use>
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
</g>
<g id="zoomMin">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/>
</use>
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
</g>
<g id="dirArrow">
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="resetDef">
<use xlink:href="#rim2" fill="#404040">
<set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/>
</use>
</g>
</defs>
<script type="text/javascript">
var viewWidth = 623;
var viewHeight = 95;
var sectionId = 'dynsection-0';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>cpu_scheduling_algorithms/fcfs_scheduling.cpp</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-91 619,-91 619,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Implementation of FCFS CPU scheduling algorithm.">
<polygon fill="#bfbfbf" stroke="black" points="222,-56.5 222,-86.5 360,-86.5 360,-56.5 222,-56.5"/>
<text text-anchor="start" x="230" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">cpu_scheduling_algorithms</text>
<text text-anchor="middle" x="291" y="-63.5" font-family="Helvetica,sans-Serif" font-size="10.00">/fcfs_scheduling.cpp</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="0,-0.5 0,-19.5 58,-19.5 58,-0.5 0,-0.5"/>
<text text-anchor="middle" x="29" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">algorithm</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M227.72,-56.42C185.2,-46.92 127.64,-33.98 68.01,-20.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="68.57,-16.75 58.04,-17.91 66.99,-23.57 68.57,-16.75"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="76.5,-0.5 76.5,-19.5 125.5,-19.5 125.5,-0.5 76.5,-0.5"/>
<text text-anchor="middle" x="101" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M245.97,-56.4C212.16,-45.81 166.53,-31.52 135.56,-21.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="136.24,-18.37 125.66,-18.72 134.15,-25.05 136.24,-18.37"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="143.5,-0.5 143.5,-19.5 188.5,-19.5 188.5,-0.5 143.5,-0.5"/>
<text text-anchor="middle" x="166" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cstdlib</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M261.38,-56.4C240.78,-46.59 213.52,-33.62 193.42,-24.05"/>
<polygon fill="midnightblue" stroke="midnightblue" points="194.72,-20.8 184.19,-19.66 191.71,-27.12 194.72,-20.8"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="207,-0.5 207,-19.5 247,-19.5 247,-0.5 207,-0.5"/>
<text text-anchor="middle" x="227" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">ctime</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M275.83,-56.4C266.25,-47.49 253.84,-35.95 243.93,-26.74"/>
<polygon fill="midnightblue" stroke="midnightblue" points="246.02,-23.9 236.31,-19.66 241.25,-29.03 246.02,-23.9"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="265,-0.5 265,-19.5 317,-19.5 317,-0.5 265,-0.5"/>
<text text-anchor="middle" x="291" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">iomanip</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M291,-56.4C291,-48.47 291,-38.46 291,-29.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="294.5,-29.66 291,-19.66 287.5,-29.66 294.5,-29.66"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="335.5,-0.5 335.5,-19.5 390.5,-19.5 390.5,-0.5 335.5,-0.5"/>
<text text-anchor="middle" x="363" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M308.06,-56.4C319.06,-47.31 333.37,-35.49 344.62,-26.19"/>
<polygon fill="midnightblue" stroke="midnightblue" points="347.04,-28.73 352.52,-19.66 342.59,-23.33 347.04,-28.73"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="409,-0.5 409,-19.5 453,-19.5 453,-0.5 409,-0.5"/>
<text text-anchor="middle" x="431" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">queue</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node1&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M324.18,-56.4C347.56,-46.46 378.61,-33.26 401.21,-23.66"/>
<polygon fill="midnightblue" stroke="midnightblue" points="402.79,-26.79 410.63,-19.66 400.06,-20.35 402.79,-26.79"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="471.5,-0.5 471.5,-19.5 552.5,-19.5 552.5,-0.5 471.5,-0.5"/>
<text text-anchor="middle" x="512" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">unordered_set</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node1&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M343.09,-56.47C382.05,-45.99 434.61,-31.84 470.69,-22.12"/>
<polygon fill="midnightblue" stroke="midnightblue" points="471.66,-25.49 480.4,-19.51 469.84,-18.73 471.66,-25.49"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="571,-0.5 571,-19.5 615,-19.5 615,-0.5 571,-0.5"/>
<text text-anchor="middle" x="593" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node1&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M360.17,-59.54C412.8,-50.76 487.18,-37.4 560.81,-20.11"/>
<polygon fill="midnightblue" stroke="midnightblue" points="561.8,-23.47 570.72,-17.75 560.18,-16.66 561.8,-23.47"/>
</g>
</g>
</svg>
<g id="navigator" transform="translate(0 0)" fill="#404254">
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowRight" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowDown" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowLeft" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
</g>
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
<g id="arrow_out" transform="scale(0.3 0.3)">
<a xlink:href="fcfs__scheduling_8cpp__incl_org.svg" target="_base">
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
<path id="arrow"
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
style="fill:#404040;"/>
</a>
</g>
</svg>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.49.1 (20210923.0004)
-->
<!-- Title: cpu_scheduling_algorithms/fcfs_scheduling.cpp Pages: 1 -->
<svg width="623pt" height="95pt"
viewBox="0.00 0.00 623.00 95.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 91)">
<title>cpu_scheduling_algorithms/fcfs_scheduling.cpp</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-91 619,-91 619,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Implementation of FCFS CPU scheduling algorithm.">
<polygon fill="#bfbfbf" stroke="black" points="222,-56.5 222,-86.5 360,-86.5 360,-56.5 222,-56.5"/>
<text text-anchor="start" x="230" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">cpu_scheduling_algorithms</text>
<text text-anchor="middle" x="291" y="-63.5" font-family="Helvetica,sans-Serif" font-size="10.00">/fcfs_scheduling.cpp</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="0,-0.5 0,-19.5 58,-19.5 58,-0.5 0,-0.5"/>
<text text-anchor="middle" x="29" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">algorithm</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M227.72,-56.42C185.2,-46.92 127.64,-33.98 68.01,-20.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="68.57,-16.75 58.04,-17.91 66.99,-23.57 68.57,-16.75"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="76.5,-0.5 76.5,-19.5 125.5,-19.5 125.5,-0.5 76.5,-0.5"/>
<text text-anchor="middle" x="101" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M245.97,-56.4C212.16,-45.81 166.53,-31.52 135.56,-21.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="136.24,-18.37 125.66,-18.72 134.15,-25.05 136.24,-18.37"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="143.5,-0.5 143.5,-19.5 188.5,-19.5 188.5,-0.5 143.5,-0.5"/>
<text text-anchor="middle" x="166" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cstdlib</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M261.38,-56.4C240.78,-46.59 213.52,-33.62 193.42,-24.05"/>
<polygon fill="midnightblue" stroke="midnightblue" points="194.72,-20.8 184.19,-19.66 191.71,-27.12 194.72,-20.8"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="207,-0.5 207,-19.5 247,-19.5 247,-0.5 207,-0.5"/>
<text text-anchor="middle" x="227" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">ctime</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M275.83,-56.4C266.25,-47.49 253.84,-35.95 243.93,-26.74"/>
<polygon fill="midnightblue" stroke="midnightblue" points="246.02,-23.9 236.31,-19.66 241.25,-29.03 246.02,-23.9"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="265,-0.5 265,-19.5 317,-19.5 317,-0.5 265,-0.5"/>
<text text-anchor="middle" x="291" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">iomanip</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M291,-56.4C291,-48.47 291,-38.46 291,-29.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="294.5,-29.66 291,-19.66 287.5,-29.66 294.5,-29.66"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="335.5,-0.5 335.5,-19.5 390.5,-19.5 390.5,-0.5 335.5,-0.5"/>
<text text-anchor="middle" x="363" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M308.06,-56.4C319.06,-47.31 333.37,-35.49 344.62,-26.19"/>
<polygon fill="midnightblue" stroke="midnightblue" points="347.04,-28.73 352.52,-19.66 342.59,-23.33 347.04,-28.73"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="409,-0.5 409,-19.5 453,-19.5 453,-0.5 409,-0.5"/>
<text text-anchor="middle" x="431" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">queue</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node1&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M324.18,-56.4C347.56,-46.46 378.61,-33.26 401.21,-23.66"/>
<polygon fill="midnightblue" stroke="midnightblue" points="402.79,-26.79 410.63,-19.66 400.06,-20.35 402.79,-26.79"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="471.5,-0.5 471.5,-19.5 552.5,-19.5 552.5,-0.5 471.5,-0.5"/>
<text text-anchor="middle" x="512" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">unordered_set</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node1&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M343.09,-56.47C382.05,-45.99 434.61,-31.84 470.69,-22.12"/>
<polygon fill="midnightblue" stroke="midnightblue" points="471.66,-25.49 480.4,-19.51 469.84,-18.73 471.66,-25.49"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="571,-0.5 571,-19.5 615,-19.5 615,-0.5 571,-0.5"/>
<text text-anchor="middle" x="593" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node1&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M360.17,-59.54C412.8,-50.76 487.18,-37.4 560.81,-20.11"/>
<polygon fill="midnightblue" stroke="midnightblue" points="561.8,-23.47 570.72,-17.75 560.18,-16.66 561.8,-23.47"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -163,21 +163,21 @@ Functions</h2></td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >An implementation for finding the <a href="https://www.youtube.com/watch?v=5cPbNCrdotA" target="_blank">Inorder successor of a binary search tree</a> Inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in Inorder traversal. </p>
<h3><a class="anchor" id="autotoc_md80"></a>
<h3><a class="anchor" id="autotoc_md81"></a>
Case 1: The given node has the right node/subtree</h3>
<pre class="fragment"> * In this case, the left-most deepest node in the right subtree will
</pre><p> come just after the given node as we go to left deep in inorder.</p><ul>
<li>Go deep to left most node in right subtree. OR, we can also say in case if BST, find the minimum of the subtree for a given node.</li>
</ul>
<h3><a class="anchor" id="autotoc_md81"></a>
<h3><a class="anchor" id="autotoc_md82"></a>
Case 2: The given node does not have a right node/subtree</h3>
<h4><a class="anchor" id="autotoc_md82"></a>
<h4><a class="anchor" id="autotoc_md83"></a>
Method 1: Use parent pointer (store the address of parent nodes)</h4>
<ul>
<li>If a node does not have the right subtree, and we already visited the node itself, then the next node will be its parent node according to inorder traversal, and if we are going to parent from left, then the parent would be unvisited.</li>
<li>In other words, go to the nearest ancestor for which given node would be in left subtree.</li>
</ul>
<h4><a class="anchor" id="autotoc_md83"></a>
<h4><a class="anchor" id="autotoc_md84"></a>
Method 2: Search from the root node</h4>
<ul>
<li>In case if there is no link from a child node to the parent node, we need to walk down the tree starting from the root node to the given node, by doing so, we are visiting every ancestor of the given node.</li>

View File

@@ -125,7 +125,7 @@ Functions</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation to check whether a number is a power of 2 or not. </p>
<p >This algorithm uses bit manipulation to check if a number is a power of 2 or not.</p>
<h3><a class="anchor" id="autotoc_md78"></a>
<h3><a class="anchor" id="autotoc_md79"></a>
Algorithm</h3>
<p >Let the input number be n, then the bitwise and between n and n-1 will let us know whether the number is power of 2 or not</p>
<p >For Example, If N= 32 then N-1 is 31, if we perform bitwise and of these two numbers then the result will be zero, which indicates that it is the power of 2 If N=23 then N-1 is 22, if we perform bitwise and of these two numbers then the result will not be zero , which indicates that it is not the power of 2 </p><dl class="section note"><dt>Note</dt><dd>This implementation is better than naive recursive or iterative approach.</dd></dl>

View File

@@ -136,7 +136,7 @@ Functions</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation of <a href="https://en.wikipedia.org/wiki/Gift_wrapping_algorithm" target="_blank">Jarviss</a> algorithm. </p>
<p >Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the points of it.</p>
<h3><a class="anchor" id="autotoc_md66"></a>
<h3><a class="anchor" id="autotoc_md67"></a>
Algorithm</h3>
<p >The idea of Jarviss Algorithm is simple, we start from the leftmost point (or point with minimum x coordinate value) and we keep wrapping points in counterclockwise direction.</p>
<p >The idea is to use orientation() here. Next point is selected as the point that beats all other points at counterclockwise orientation, i.e., next point is q if for any other point r, we have “orientation(p, q, r) = counterclockwise”.</p>

View File

@@ -139,7 +139,7 @@ Functions</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation of the <a href="https://en.wikipedia.org/wiki/Selection_sort" target="_blank">Selection sort</a> implementation using recursion. </p>
<p >The selection sort algorithm divides the input list into two parts: a sorted sublist of items which is built up from left to right at the front (left) of the list, and a sublist of the remaining unsorted items that occupy the rest of the list. Initially, the sorted sublist is empty, and the unsorted sublist is the entire input list. The algorithm proceeds by finding the smallest (or largest, depending on the sorting order) element in the unsorted sublist, exchanging (swapping) it with the leftmost unsorted element (putting it in sorted order), and moving the sublist boundaries one element to the right.</p>
<h3><a class="anchor" id="autotoc_md101"></a>
<h3><a class="anchor" id="autotoc_md102"></a>
Implementation</h3>
<p >FindMinIndex This function finds the minimum element of the array(list) recursively by simply comparing the minimum element of array reduced size by 1 and compares it to the last element of the array to find the minimum of the whole array.</p>
<p >SelectionSortRecursive Just like selection sort, it divides the list into two parts (i.e.: sorted and unsorted) and finds the minimum of the unsorted array. By calling the <code>FindMinIndex</code> function, it swaps the minimum element with the first element of the list, and then solves recursively for the remaining unsorted list. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Tushar-K24" target="_blank">Tushar Khanduri</a> </dd></dl>