mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-23 13:22:47 +08:00
Documentation for 341ed50da8
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.1"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: greedy_algorithms/jumpgame.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -17,9 +17,9 @@
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
@@ -32,8 +32,7 @@
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Algorithms_in_C++
|
||||
 <span id="projectnumber">1.0.0</span>
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
@@ -42,21 +41,22 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.1 -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
@@ -70,7 +70,7 @@ $(function() {
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('df/d64/jumpgame_8cpp.html','../../'); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
@@ -92,12 +92,11 @@ $(document).ready(function(){initNavTree('df/d64/jumpgame_8cpp.html','../../');
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">jumpgame.cpp File Reference</div> </div>
|
||||
<div class="headertitle"><div class="title">jumpgame.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Implementation of an algorithm to solve the <a href="../../(https://leetcode.com/problems/jump-game/)">jumping game</a> problem.
|
||||
<p>Implementation of an algorithm to solve the <a href="../../(https://leetcode.com/problems/jump-game/)" target="_blank">jumping game</a> problem.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <vector></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
@@ -109,7 +108,7 @@ Include dependency graph for jumpgame.cpp:</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:af205390325e8c999bd68b93fa5252755"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">canJump</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > &nums)</td></tr>
|
||||
<tr class="memdesc:af205390325e8c999bd68b93fa5252755"><td class="mdescLeft"> </td><td class="mdescRight">This function implements the above algorithm. <a href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">More...</a><br /></td></tr>
|
||||
@@ -122,10 +121,10 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of an algorithm to solve the <a href="../../(https://leetcode.com/problems/jump-game/)">jumping game</a> problem. </p>
|
||||
<p><b>Problem statement:</b> Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. This solution takes in input as a vector and output as a boolean to check if you can reach the last position. We name the indices good and bad based on whether we can reach the destination if we start at that position. We initialize the last index as lastPos. Here, we start from the end of the array and check if we can ever reach the first index. We check if the sum of the index and the maximum jump count given is greater than or equal to the lastPos. If yes, then that is the last position you can reach starting from the back. After the end of the loop, if we reach the lastPos as 0, then the destination can be reached from the start position. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/rakshaa2000">Rakshaa Viswanathan</a> </dd></dl>
|
||||
<div class="textblock"><p >Implementation of an algorithm to solve the <a href="../../(https://leetcode.com/problems/jump-game/)" target="_blank">jumping game</a> problem. </p>
|
||||
<p ><b>Problem statement:</b> Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. This solution takes in input as a vector and output as a boolean to check if you can reach the last position. We name the indices good and bad based on whether we can reach the destination if we start at that position. We initialize the last index as lastPos. Here, we start from the end of the array and check if we can ever reach the first index. We check if the sum of the index and the maximum jump count given is greater than or equal to the lastPos. If yes, then that is the last position you can reach starting from the back. After the end of the loop, if we reach the lastPos as 0, then the destination can be reached from the start position. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/rakshaa2000" target="_blank">Rakshaa Viswanathan</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="af205390325e8c999bd68b93fa5252755"></a>
|
||||
<a id="af205390325e8c999bd68b93fa5252755" name="af205390325e8c999bd68b93fa5252755"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af205390325e8c999bd68b93fa5252755">◆ </a></span>canJump()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -149,15 +148,15 @@ Functions</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>bool value whether final index can be reached or not </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  {</div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keyword">auto</span> lastPos = nums.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 1;</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> i = nums.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 1; i >= 0; i--) {</div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">if</span> (i + nums[i] >= lastPos) {</div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  lastPos = i;</div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  }</div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  }</div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">return</span> lastPos == 0;</div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> }</div>
|
||||
<div class="fragment"><div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> {</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">auto</span> lastPos = nums.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 1;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> i = nums.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 1; i >= 0; i--) {</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">if</span> (i + nums[i] >= lastPos) {</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> lastPos = i;</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> }</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> }</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">return</span> lastPos == 0;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>}</div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -168,7 +167,7 @@ Here is the call graph for this function:</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -186,10 +185,10 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <a class="code" href="../../df/d64/jumpgame_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> }</div>
|
||||
<div class="fragment"><div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> {</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_function" href="../../df/d64/jumpgame_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>}</div>
|
||||
<div class="ttc" id="ajumpgame_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../df/d64/jumpgame_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function to test above algorithm.</div><div class="ttdef"><b>Definition:</b> jumpgame.cpp:41</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -200,7 +199,7 @@ Here is the call graph for this function:</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa8dca7b867074164d5f45b0f3851269d"></a>
|
||||
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">◆ </a></span>test()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -225,28 +224,28 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Function to test above algorithm. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  {</div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="comment">// Test 1</span></div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> num1={4,3,1,0,5};</div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  assert(<a class="code" href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">canJump</a>(num1)==<span class="keyword">true</span>);</div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Input: "</span>;</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> i: num1){</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<i<<<span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Output: true"</span><<<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="comment">// Test 2</span></div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> num2={3,2,1,0,4};</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  assert(<a class="code" href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">canJump</a>(num2)==<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Input: "</span>;</div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> i: num2){</div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<i<<<span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  }</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Output: false"</span><<<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> }</div>
|
||||
<div class="fragment"><div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="comment">// Test 1</span></div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> num1={4,3,1,0,5};</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> assert(<a class="code hl_function" href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">canJump</a>(num1)==<span class="keyword">true</span>);</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Input: "</span>;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> i: num1){</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<i<<<span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> }</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Output: true"</span><<<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// Test 2</span></div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> num2={3,2,1,0,4};</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> assert(<a class="code hl_function" href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">canJump</a>(num2)==<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Input: "</span>;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">for</span>(<span class="keyword">auto</span> i: num2){</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<i<<<span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a><<<span class="stringliteral">"Output: false"</span><<<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="ajumpgame_8cpp_html_af205390325e8c999bd68b93fa5252755"><div class="ttname"><a href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">canJump</a></div><div class="ttdeci">bool canJump(const std::vector< int > &nums)</div><div class="ttdoc">This function implements the above algorithm.</div><div class="ttdef"><b>Definition:</b> jumpgame.cpp:26</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< int ></a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -262,7 +261,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_0eaa691bd54ab0922ca7f50599de6d22.html">greedy_algorithms</a></li><li class="navelem"><a class="el" href="../../df/d64/jumpgame_8cpp.html">jumpgame.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user