Libraryless. Click here for Pure Java version (3019L/20K).
| 1 | svoid test_LongPriorityQueue() {
 | 
| 2 | LongPriorityQueue q = new(-1, (a, b) -> cmp(b, a)); | 
| 3 | q.add(3); | 
| 4 | q.add(1); | 
| 5 | q.add(10); | 
| 6 | q.add(100); | 
| 7 | q.add(-10); | 
| 8 | new L<Long> out; | 
| 9 | while (!q.isEmpty()) out.add(q.pop()); | 
| 10 | assertEqualsVerbose(ll(100L, 10L, 3L, 1L, -10L), out); | 
| 11 | } | 
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1029491 | 
| Snippet name: | test_LongPriorityQueue (OK) | 
| Eternal ID of this version: | #1029491/3 | 
| Text MD5: | f4a128e4d283f391f10454cf73e2edc0 | 
| Transpilation MD5: | fef154c4b24c40cdda5e9469ed6064d2 | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2020-08-15 14:37:24 | 
| Source code size: | 280 bytes / 11 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 409 / 562 | 
| Version history: | 2 change(s) | 
| Referenced in: | [show references] |