[Tutorial] Find the kth element in an array with update queries using Trie

Revision en1, by quanlt206, 2022-07-09 07:27:15

Problems

Give an array consists N integers and Q queries, with two types :

  1. ? k -> print the kth element in this array.
  2. ! k -> remove the kth element in this array.
Tags #trie

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en15 English quanlt206 2022-07-10 11:41:57 9 Tiny change: 'ie, O(nlog(max(k))) complexi' -> 'ie, O(nlogn) complexi'
en14 English quanlt206 2022-07-10 11:31:23 9
en13 English quanlt206 2022-07-10 04:17:13 7
en12 English quanlt206 2022-07-09 17:51:04 12 Tiny change: ' Trie, O(n) complexi' -> ' Trie, O(nlog(max(k))) complexi'
en11 English quanlt206 2022-07-09 17:44:29 34
en10 English quanlt206 2022-07-09 16:14:47 59 (published)
en9 English quanlt206 2022-07-09 16:13:46 89
en8 English quanlt206 2022-07-09 16:12:39 20
en7 English quanlt206 2022-07-09 16:11:10 88
en6 English quanlt206 2022-07-09 16:09:10 4
en5 English quanlt206 2022-07-09 16:08:15 7802
en4 English quanlt206 2022-07-09 15:52:59 536
en3 English quanlt206 2022-07-09 11:09:43 251
en2 English quanlt206 2022-07-09 08:27:43 2271
en1 English quanlt206 2022-07-09 07:27:15 277 Initial revision (saved to drafts)