https://algorist.com//algowiki/index.php?title=3.31&feed=atom&action=history
3.31 - Revision history
2024-03-28T21:15:57Z
Revision history for this page on the wiki
MediaWiki 1.34.2
https://algorist.com//algowiki/index.php?title=3.31&diff=294&oldid=prev
Algowikiadmin: Created page with "Init: k=0 Insert X: k = k+1; A[X] = k; B[k] = X; Search X: return (A[X] < k) and (B[A[X]] == X) Delete X: A[B[k]] = A[X]; B[A[X]] = B[k]; k = k-1; Ple..."
2020-09-20T18:08:45Z
<p>Created page with "Init: k=0 Insert X: k = k+1; A[X] = k; B[k] = X; Search X: return (A[X] < k) and (B[A[X]] == X) Delete X: A[B[k]] = A[X]; B[A[X]] = B[k]; k = k-1; Ple..."</p>
<p><b>New page</b></p><div>Init:<br />
k=0<br />
<br />
Insert X:<br />
k = k+1; <br />
A[X] = k; <br />
B[k] = X;<br />
<br />
Search X:<br />
return (A[X] < k) and (B[A[X]] == X)<br />
<br />
Delete X: <br />
A[B[k]] = A[X]; <br />
B[A[X]] = B[k]; <br />
k = k-1;<br />
<br />
Please note that this data structure doesn't support inserting the same X more than once.<br />
<br />
<br />
Back to [[Chapter 3]]</div>
Algowikiadmin