Approach 1: Trie with each node saving all the indices of numbers saved under that node
Approach 2: Persistent Segment Tree
Approach 3: Merge Sort Tree with policy based data structure for updating

Contributors

Statistics

76% Solution Ratio
YouKnowWhoEarliest, Aug '19
mdshadeshFastest, 0.0s
mdshadeshLightest, 75 kB
mumith_fahim99Shortest, 1946B
Toph uses cookies. By continuing you agree to our Cookie Policy.