Documentation for 0d766b0f8a

This commit is contained in:
realstealthninja
2024-11-04 12:32:06 +00:00
parent fb1d00ead7
commit 4fb6e622e9
280 changed files with 2978 additions and 4001 deletions

View File

@@ -231,7 +231,7 @@ pen apple". Note that you are allowed to reuse a dictionary word.</p>
<div class="line"><span class="lineno"> 105</span> <span class="comment">// if the prefix till current position is present in the dictionary</span></div>
<div class="line"><span class="lineno"> 106</span> <span class="comment">// and the remaining substring can also be segmented legally, then</span></div>
<div class="line"><span class="lineno"> 107</span> <span class="comment">// set solution at position pos in the memo, and return true</span></div>
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#a1cc9dd6e6190d10a010fdcdfe7a21a81">exists</a>(wordTillNow, strSet) and <a class="code hl_function" href="#a272b0f5cdb4e41fd6dee4538b808c06a">check</a>(s, strSet, i + 1, <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>)) {</div>
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#a1cc9dd6e6190d10a010fdcdfe7a21a81">exists</a>(wordTillNow, strSet) &amp;&amp; <a class="code hl_function" href="#a272b0f5cdb4e41fd6dee4538b808c06a">check</a>(s, strSet, i + 1, <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>)) {</div>
<div class="line"><span class="lineno"> 109</span> <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>-&gt;at(pos) = 1;</div>
<div class="line"><span class="lineno"> 110</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 111</span> }</div>