A probabilistic skip list storing unique sorted LONG keys with expected O(log n) add, remove, and contains operations.
A probabilistic skip list storing unique sorted LONG keys with expected O(log n) add, remove, and contains operations.
Kind: Container | Category: H-Lib Native Containers
PBXB64 Status: AVAILABLE
PBXB64 Certification: [CERTIFIED TESTED]
This H-Lib container is implemented in native C support code and exposed through PBXB64 BASIC container syntax. The examples below are focused usage patterns; keep handles valid, release each container with its Final method, and check counts or return values when a method can fail.
| Method | Signature | Returns | Description |
|---|---|---|---|
| New | s.New | LNSKIPLIST | Allocate a new empty skiplist. |
| Final | s.Final | none | Free the skiplist. |
| Validate | s.Validate | LONG | Non-zero if the handle is valid. |
| Clear | s.Clear | none | Remove all keys. |
| Count | s.Count | LONG | Number of keys. |
| Add | s.Add key | none | Insert a key. |
| Remove | s.Remove key | none | Remove a key. |
| Contains | s.Contains key | LONG | Non-zero if the key is present. |
| First | s.First | QUAD | Return the smallest key (0 if empty). |
| Next | s.Next key | QUAD | Return the next larger key (0 if none). |
| Empty | s.Empty | LONG | Non-zero if the skiplist is empty. |
Validation evidence: H-Lib container behavior is exercised by registered BASIC container validation programs and the embedded H-Lib object set used by the single-EXE validation gate.
Diese Referenzseite soll durch ein fokussiertes Compile- oder Laufzeitbeispiel belegt sein. Das Beispiel soll Eingaben, erwartete Ausgabe oder Exit-Code und erforderliche Windows-Ressourcen oder Include-Dateien nennen.
Allgemeine Übersichtsseiten sollten trotzdem sagen, welche Familie gemeint ist, welche konkreten Befehlsseiten die Implementierung tragen und welche Formen nur der Navigation dienen. So bleibt die Seite detailliert genug, ohne so zu tun, als wäre sie eine vollständige Befehlsreferenz.
LOCAL s AS LNSKIPLIST s = s.New s.Add 3 s.Add 1 PRINT s.First ' 1 s.Final