mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-25 22:32:24 +08:00
Documentation for f7a5aecce5
This commit is contained in:
@@ -148,14 +148,14 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list" target="_blank">Sublist Search Algorithm</a> </p>
|
||||
<h3><a class="anchor" id="autotoc_md94"></a>
|
||||
<h3><a class="anchor" id="autotoc_md95"></a>
|
||||
Algorithm</h3>
|
||||
<ul>
|
||||
<li>Sublist search is used to detect a presence of one list in another list.</li>
|
||||
<li>Suppose we have a single-node list (let's say the first list), and we want to ensure that the list is present in another list (let's say the second list), then we can perform the sublist search to find it.</li>
|
||||
<li>For instance, the first list contains these elements: 23 -> 30 -> 41, and the second list contains these elements: 10 -> 15 -> 23 -> 30 -> 41 -> 49. At a glance, we see that the first list presents in the second list.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" id="autotoc_md95"></a>
|
||||
<h3><a class="anchor" id="autotoc_md96"></a>
|
||||
Working</h3>
|
||||
<ul>
|
||||
<li>The sublist search algorithm works by comparing the first element of the first list with the first element of the second list.</li>
|
||||
|
||||
Reference in New Issue
Block a user