mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-31 01:02:46 +08:00
Documentation for 0d766b0f8a
This commit is contained in:
@@ -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) && <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>->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>
|
||||
|
||||
Reference in New Issue
Block a user