Competitive Programming


Methods to Solve (2000-present)

Use these filters to narrow down your next problem to solve:

OJ: , Topic: , Quality: , Difficulty:

You can now sort these problems based on Distinct ACcepted Users (DACU) column.
Generally, problems with high DACU are the easier problems.
Note that we only update DACU column manually when we first entered the hint (thus an outdated data).

Column Point is only used in Kattis (and simulated in LeetCode) online judge.

All OJ Problem Title CP4+5 Hint DACU Point
12150 Fetching from uHunt 2.2a, 1D Array, Medium simple manipulation 0.0
12356 Fetching from uHunt 2.2a, 1D Array, Medium similar to deletion in doubly linked lists but we can still use a 1D array for the underlying data structure 0.0
downtime downtime 2.2a, 1D Array, Medium 1D array; use Fenwick Tree-like operation for Range Update Point Query 1068 3.2
fluortanten fluortanten 2.2a, 1D Array, Medium remove Bjorn first; then do O(n) pass to check where is Bjorn's optimal position 181 3.1
greedilyincreasing greedilyincreasing 2.2a, 1D Array, Medium just 1D array manipulation; this is not the DP-LIS problem 1151 1.9
jollyjumpers jollyjumpers 2.2a, 1D Array, Medium 1D Boolean flags to check [1..n-1]; also available at UVa 10038 - Jolly Jumpers 413 3.4
lc0088 to replace with LeetCode link soon... 2.2a, 1D Array, Medium do merge of Merge sort; top-interview-150 0 2.0
lc0605 to replace with LeetCode link soon... 2.2a, 1D Array, Medium tricky 1D array processing; leetcode-75 0 2.0
10978 Fetching from uHunt 2.2c, 1D Array, Harder 1D string array 0.0
12662 Fetching from uHunt 2.2c, 1D Array, Harder 1D array manipulation; brute force 0.0
13048 Fetching from uHunt 2.2c, 1D Array, Harder use 1D Boolean array; simulate 0.0
divideby100 divideby100 2.2c, 1D Array, Harder big 1D character array processing; be careful 557 4.2
lc0238 to replace with LeetCode link soon... 2.2c, 1D Array, Harder use prefix and suffix products; leetcode-75; top-100-liked; top-interview-150 0 4.0
lc1869 to replace with LeetCode link soon... 2.2c, 1D Array, Harder split s using 0 as delimiter; take token with the max length; do the same but using 1 as delimiter; compare 0 2.0
mastermind mastermind 2.2c, 1D Array, Harder 1D array manipulation to count r and s 446 2.4
pivot pivot 2.2c, 1D Array, Harder static range min/max query problem; special condition allows this problem to be solvable in O(n) using help of 1D arrays 1723 3.2
11581 Fetching from uHunt 2.2d, 2D Array, Medium simulate the process 0.0
12667 Fetching from uHunt 2.2d, 2D Array, Medium use both 1D and 2D arrays to store submission status 0.0
epigdanceoff epigdanceoff 2.2d, 2D Array, Medium count number of CCs on 2D grid; simpler solution exists: count the number of blank columns plus one 505 1.9
flowshop flowshop 2.2d, 2D Array, Medium interesting 2D array manipulation 392 2.5
imageprocessing imageprocessing 2.2d, 2D Array, Medium interesting 2D array manipulation 344 2.1
lc0027 to replace with LeetCode link soon... 2.2d, 2D Array, Medium use Partition algorithm (two pointers) for in-place solution; top-interview-150 0 2.0
lc1351 to replace with LeetCode link soon... 2.2d, 2D Array, Medium go row by row; right to left, O(m+n) 0 2.0
nineknights nineknights 2.2d, 2D Array, Medium 2D array checks; 8 directions 881 1.9
00466 Fetching from uHunt 2.2e, 2D Array, Harder core functions: rotate and reflect 0.0
12291 Fetching from uHunt 2.2e, 2D Array, Harder do as asked; a bit tedious 0.0
2048 2048 2.2e, 2D Array, Harder just a 2D array manipulation problem; utilize symmetry using 90 degrees rotation(s) to reduce 4 cases into 1 3150 2.1
flagquiz flagquiz 2.2e, 2D Array, Harder array of array of strings; be careful; duplicates may exists 167 3.7
funhouse funhouse 2.2e, 2D Array, Harder 2D array manipulation; note the direction update 700 2.0
lc0054 to replace with LeetCode link soon... 2.2e, 2D Array, Harder heavy 2D matrix indexing; use dr/dc technique; programming-skills; top-100-liked; top-interview-150 0 4.0
rings2 rings2 2.2e, 2D Array, Harder more challenging 2D array manipulation; special output formatting style 385 3.8
10107 Fetching from uHunt 2.2f, Sorting, Easier find median of a growing/dynamic list of integers; we can use multiple calls of nth_element in algorithm 0.0
12709 Fetching from uHunt 2.2f, Sorting, Easier LA 6650 - Dhaka13; although the problem has a complicated story; it has a very easy solution with sort routine 0.0
basicprogramming2 basicprogramming2 2.2f, Sorting, Easier a nice problem about basic sorting applications 189 3.4
height height 2.2f, Sorting, Easier insertion sort simulation 899 2.0
lc0217 to replace with LeetCode link soon... 2.2f, Sorting, Easier sort; check adjacent integers 0 2.0
lc1657 to replace with LeetCode link soon... 2.2f, Sorting, Easier check if set of chars and its sorted frequency signatures are the same; leetcode-75 0 4.0
mjehuric mjehuric 2.2f, Sorting, Easier a direct simulation of a bubble sort algorithm 1349 1.6
sidewayssorting sidewayssorting 2.2f, Sorting, Easier stable_sort or sort multi-fields of columns of a 2D array; ignore case 857 2.0
lc0219 to replace with LeetCode link soon... 2.2g, Sorting, Simple Greedy sort (keep the original indices as pair (v, i)); check successive elements; top-interview-150 0 2.0
lc1502 to replace with LeetCode link soon... 2.2g, Sorting, Simple Greedy sort; check gap of successive elements; programming-skills 0 2.0
lc1637 to replace with LeetCode link soon... 2.2g, Sorting, Simple Greedy sort; remove duplicate x-s; check successive elements 0 2.0
lc1984 to replace with LeetCode link soon... 2.2g, Sorting, Simple Greedy sort; check elements that are k indices apart 0 2.0
lc2342 to replace with LeetCode link soon... 2.2g, Sorting, Simple Greedy sum-of-digits function; sort by (sod(n), n); check successive elements 0 4.0
lc2465 to replace with LeetCode link soon... 2.2g, Sorting, Simple Greedy sort; two pointers: smallest and largest 0 2.0
lc2500 to replace with LeetCode link soon... 2.2g, Sorting, Simple Greedy sort each row; process per column 0 2.0
01610 Fetching from uHunt 2.2h, Sorting, Harder LA 6196 - MidAtlanticUSA12; median 0.0
11321 Fetching from uHunt 2.2h, Sorting, Harder be careful with negative mod! 0.0
classy classy 2.2h, Sorting, Harder sort using modified comparison function; a bit of string parsing/tokenization 1633 4.5
dyslectionary dyslectionary 2.2h, Sorting, Harder sort the reverse of original string; output formatting 775 3.4
lc0001 to replace with LeetCode link soon... 2.2h, Sorting, Harder classic; O(n log n) solution: sort + two pointers; top-100-liked; top-interview-150 0 2.0
musicyourway musicyourway 2.2h, Sorting, Harder stable_sort; custom comparison function 404 2.4
sortofsorting sortofsorting 2.2h, Sorting, Harder stable_sort or sort multi-fields 2667 2.2
11462 Fetching from uHunt 2.2i, Special Sorting standard Counting Sort problem 0.0
11495 Fetching from uHunt 2.2i, Special Sorting requires O(n log n) merge sort 0.0
13212 Fetching from uHunt 2.2i, Special Sorting requires O(n log n) merge sort 0.0
bread bread 2.2i, Special Sorting inversion count; hard to derive 249 5.0
lc1122 to replace with LeetCode link soon... 2.2i, Special Sorting counting sort variant using arr2 order 0 2.0
mali mali 2.2i, Special Sorting Counting Sort two arrays; greedy matching largest+smallest at that point 97 5.1
12571 Fetching from uHunt 2.2j, Bit Manipulation precalculate AND operations 0.0
12720 Fetching from uHunt 2.2j, Bit Manipulation observe the pattern in this binary to decimal conversion variant; involves modulo arithmetic 0.0
bitbybit bitbybit 2.2j, Bit Manipulation be very careful with and + or corner cases 955 2.9
deathstar deathstar 2.2j, Bit Manipulation can be solved with bit manipulation 415 2.0
lc0338 to replace with LeetCode link soon... 2.2j, Bit Manipulation bit_count; trivial; leetcode-75 0 2.0
lc1318 to replace with LeetCode link soon... 2.2j, Bit Manipulation check all 31 bits; a few sub-cases per bit; leetcode-75 0 4.0
snapperhard snapperhard 2.2j, Bit Manipulation bit manipulation; find the pattern; the easier version is also available at Kattis - snappereasy 501 2.3
10523 Fetching from uHunt 2.2k, Big Integer, Easier BigInteger addition; multiplication; and power 0.0
10925 Fetching from uHunt 2.2k, Big Integer, Easier BigInteger addition and division 0.0
11879 Fetching from uHunt 2.2k, Big Integer, Easier BigInteger: mod; divide; subtract; equals 0.0
lc0043 to replace with LeetCode link soon... 2.2k, Big Integer, Easier basic Big Integer multiplication; programming-skills 0 4.0
primaryarithmetic primaryarithmetic 2.2k, Big Integer, Easier not a Big Integer problem but a simulation of basic addition 399 2.7
simpleaddition simpleaddition 2.2k, Big Integer, Easier that A+B on BigInteger question 1913 1.9
wizardofodds wizardofodds 2.2k, Big Integer, Easier if K is bigger than 350, the answer is clear; else just check if 2^K ≥ N 488 2.6
lc2259 to replace with LeetCode link soon... 2.2l, Big Integer, Harder we can use Big Integer technique to solve this 0 2.0
01062 Fetching from uHunt 2.2m, Stack LA 3752 - WorldFinals Tokyo07; simulation with stack; maximum answer is 26 stacks; O(n) solution exists 0.0
13055 Fetching from uHunt 2.2m, Stack nice problem about stack 0.0
evenup evenup 2.2m, Stack use stack to solve this problem 1273 2.7
lc0394 to replace with LeetCode link soon... 2.2m, Stack more complex stack simulation; leetcode-75; top-100-liked 0 4.0
pairingsocks pairingsocks 2.2m, Stack simulation using two stacks; just do as asked 556 3.0
restaurant restaurant 2.2m, Stack simulation with stack-based concept; drop plates at stack 2 (LIFO); use move 2-$gt;1 to reverse order; take from stack 1... 364 4.5
throwns throwns 2.2m, Stack use stack of egg positions to help with the undo operation; be careful of corner cases involving modulo operation 1091 2.6
00551 Fetching from uHunt 2.2n, Stack-based Problems bracket matching; use stack 0.0
00727 Fetching from uHunt 2.2n, Stack-based Problems Infix to Postfix conversion problem 0.0
11111 Fetching from uHunt 2.2n, Stack-based Problems bracket matching with twists 0.0
bungeebuilder bungeebuilder 2.2n, Stack-based Problems clever usage of stack; linear pass; bracket (mountain) matching variant 83 3.3
circuitmath circuitmath 2.2n, Stack-based Problems postfix calculator problem 918 2.4
delimitersoup delimitersoup 2.2n, Stack-based Problems bracket matching; stack 382 1.9
lc0901 to replace with LeetCode link soon... 2.2n, Stack-based Problems process left-to-right (each day); monotonic non-increasing stack (price, days_increasing); leetcode-75 0 4.0
11988 Fetching from uHunt 2.2o, List/Queue/Deque rare linked list problem 0.0
12108 Fetching from uHunt 2.2o, List/Queue/Deque simulation with N queues 0.0
integerlists integerlists 2.2o, List/Queue/Deque use deque for fast deletion from front (normal) & back (reversed list); use stack to reverse the final list if it is... 882 4.8
joinstrings joinstrings 2.2o, List/Queue/Deque all '+' operations must be O(1) 959 4.1
lc0232 to replace with LeetCode link soon... 2.2o, List/Queue/Deque the interesting implementation of queue with two stacks: in-stack and out-stack 0 2.0
sim sim 2.2o, List/Queue/Deque use list and its iterator 99 2.0
teque teque 2.2o, List/Queue/Deque all operations must be O(1) 766 3.3
lc0011 to replace with LeetCode link soon... 2.2p, 1D Array, Two Pointers two pointers, l=0, r=n-1; we can always move the shorter pointer inside; leetcode-75; top-100-liked; top-interview-150 0 4.0
lc0167 to replace with LeetCode link soon... 2.2p, 1D Array, Two Pointers two pointers: leftmost and rightmost; top-interview-150 0 4.0
lc0283 to replace with LeetCode link soon... 2.2p, 1D Array, Two Pointers two pointers: leftmost zero and cur; programming-skills; leetcode-75; top-100-liked 0 2.0
lc0392 to replace with LeetCode link soon... 2.2p, 1D Array, Two Pointers variant of merge of Merge sort; leetcode-75; top-interview-150 0 2.0
lc1768 to replace with LeetCode link soon... 2.2p, 1D Array, Two Pointers variant of merge of Merge sort; programming-skills; leetcode-75 0 2.0
00261 Fetching from uHunt 2.2q, Sliding Window sliding window variant 0.0
01121 Fetching from uHunt 2.2q, Sliding Window LA 2678 - SouthEasternEurope06; sliding window variant 0.0
11536 Fetching from uHunt 2.2q, Sliding Window sliding window variant 0.0
lc0003 to replace with LeetCode link soon... 2.2q, Sliding Window increase char freq when extending; reduce window size if duplicate is seen; top-100-liked; top-interview-150 0 4.0
lc0643 to replace with LeetCode link soon... 2.2q, Sliding Window slide the window of size k; keep the max; divide by k; leetcode-75 0 2.0
sound sound 2.2q, Sliding Window sliding window variant 4; max and min; similar to Kattis - treeshopping 104 5.3
subseqhard subseqhard 2.2q, Sliding Window interesting sliding window variant 1119 3.9
01203 Fetching from uHunt 2.3a, Priority Queue LA 3135 - Beijing04; use priority_queue 0.0
11997 Fetching from uHunt 2.3a, Priority Queue sort the lists; merge two sorted lists using priority_queue to keep the K-th smallest sum every time 0.0
jugglingpatterns jugglingpatterns 2.3a, Priority Queue PQ simulation; reading comprehension 48 6.3
knigsoftheforest knigsoftheforest 2.3a, Priority Queue PQ simulation after sorting the entries by year 184 3.6
lc2462 to replace with LeetCode link soon... 2.3a, Priority Queue min PQ simulation; two pointers: i=0 and j=n-1; move inwards; leetcode-75 0 4.0
numbertree numbertree 2.3a, Priority Queue not a direct priority queue problem, but the indexing strategy is similar to binary heap indexing 1760 2.1
stockprices stockprices 2.3a, Priority Queue PQ simulation; both max and min PQ 109 3.7
00499 Fetching from uHunt 2.3b, DAT, ASCII ASCII keys 0.0
11340 Fetching from uHunt 2.3b, DAT, ASCII ASCII keys 0.0
11577 Fetching from uHunt 2.3b, DAT, ASCII A-Z keys 0.0
alphabetspam alphabetspam 2.3b, DAT, ASCII count the frequencies of lowercase, uppercase, and whitespace characters 3902 1.4
lc0389 to replace with LeetCode link soon... 2.3b, DAT, ASCII DAT ('a'..'z'); programming-skills 0 2.0
quickbrownfox quickbrownfox 2.3b, DAT, ASCII pangram; frequency counting of 26 alphabets 4433 1.6
soundex soundex 2.3b, DAT, ASCII DAT for soundex A-Z code mapping; also available at UVa 10260 - Soundex 106 2.9
01368 Fetching from uHunt 2.3c, DAT, Others for each column j, find the highest frequency character among all j-th column of all m DNA strings 0.0
11203 Fetching from uHunt 2.3c, DAT, Others count frequency of x/y/z 0.0
bookingaroom bookingaroom 2.3c, DAT, Others only 100 rooms; use 1D Boolean array 2849 1.7
busnumbers busnumbers 2.3c, DAT, Others only 1000 bus numbers; use 1D Boolean array 2776 2.4
freefood freefood 2.3c, DAT, Others only 365 days in a year 1965 1.5
lc0645 to replace with LeetCode link soon... 2.3c, DAT, Others DAT [1..10000]; find key with freq 2 (repeated) and 0 (missing) 0 2.0
princesspeach princesspeach 2.3c, DAT, Others DAT; linear pass 839 2.1
12049 Fetching from uHunt 2.3d, Hash Table (set), E unordered_multiset manipulation 0.0
13148 Fetching from uHunt 2.3d, Hash Table (set), E we can store all precomputed answers - which are given - into unordered_set 0.0
cd cd 2.3d, Hash Table (set), E unordered_set is faster than set here; or use modified merge as the input is sorted; also available at UVa 11849 - CD 3176 5.3
esej esej 2.3d, Hash Table (set), E use unordered_set to prevent duplicate 509 3.3
lc2215 to replace with LeetCode link soon... 2.3d, Hash Table (set), E use set for fast tests; leetcode-75 0 2.0
shiritori shiritori 2.3d, Hash Table (set), E linear pass; use unordered_set to keep track of words that have been called 295 2.9
greetingcard greetingcard 2.3e, Hash Table (set), H use unordered_set; only 12 neighbors 607 4.9
11348 Fetching from uHunt 2.3f, Hash Table (map), E use map and set to check uniqueness 0.0
11629 Fetching from uHunt 2.3f, Hash Table (map), E use map 0.0
competitivearcadebasketball competitivearcadebasketball 2.3f, Hash Table (map), E use unordered_map 209 2.8
conformity conformity 2.3f, Hash Table (map), E use unordered_map to count frequencies of the sorted permutations of 5 ids; also available at UVa 11286 - Conformity 1100 1.9
grandpabernie grandpabernie 2.3f, Hash Table (map), E use unordered_map plus (sorted) vector 1065 3.2
lc1679 to replace with LeetCode link soon... 2.3f, Hash Table (map), E frequency Counter; pairings; leetcode-75 0 4.0
recount recount 2.3f, Hash Table (map), E use map; frequency counting 1163 2.0
lc0347 to replace with LeetCode link soon... 2.3g, Hash Table (Counter) use Counter to count frequency; sort by frequencies; top k; top-100-liked 0 4.0
10145 Fetching from uHunt 2.3h, Hash Table (map), H use map and set 0.0
11860 Fetching from uHunt 2.3h, Hash Table (map), H use set and map; linear scan 0.0
addingwords addingwords 2.3h, Hash Table (map), H use unordered_map 1880 3.9
awkwardparty awkwardparty 2.3h, Hash Table (map), H use unordered_map to running max and running min; report the largest difference 611 3.0
basicinterpreter basicinterpreter 2.3h, Hash Table (map), H the harder version of Kattis - variablearithmetic; tedious; be careful; print string inside double quotes verbatim 152 6.7
10815 Fetching from uHunt 2.3i, Balanced BST (set) use set and string 0.0
11136 Fetching from uHunt 2.3i, Balanced BST (set) use multiset 0.0
13037 Fetching from uHunt 2.3i, Balanced BST (set) we can use set or a sorted array 0.0
bst bst 2.3i, Balanced BST (set) simulate special BST [1..N] insertions using set 449 7.3
candydivision candydivision 2.3i, Balanced BST (set) complete search from 1 to sqrt(N); insert all divisors into set for automatic sorting and elimination of duplicates 702 3.4
compoundwords compoundwords 2.3i, Balanced BST (set) use set extensively; iterator 1807 1.7
lc0056 to replace with LeetCode link soon... 2.3i, Balanced BST (set) maintain set of intervals using bBST (set); do quick merging of intervals; top-100-liked; top-interview-150 0 4.0
10138 Fetching from uHunt 2.3j, Balanced BST (map) map plates to bills; entrance time; and position 0.0
11308 Fetching from uHunt 2.3j, Balanced BST (map) use map and set 0.0
12504 Fetching from uHunt 2.3j, Balanced BST (map) use map; string to string 0.0
administrativeproblems administrativeproblems 2.3j, Balanced BST (map) use several maps as the output (of spy names) has to be sorted; be careful of corner cases 194 6.3
doctorkattis doctorkattis 2.3j, Balanced BST (map) Max Priority Queue with frequent (increaseKey) updates; use map 114 4.7
kattissquest kattissquest 2.3j, Balanced BST (map) use map of priority queues; other solutions exist 834 3.1
srednji srednji 2.3j, Balanced BST (map) go left and right of B; use fast data structure like map to help determine the result fast 164 4.1
10909 Fetching from uHunt 2.3k, Order Statistics Tree involves dynamic selection; use pb\_ds, Fenwick Tree, or augment balanced BST 0.0
babynames babynames 2.3k, Order Statistics Tree dynamic rank problem; use two pb_ds 87 5.5
continuousmedian continuousmedian 2.3k, Order Statistics Tree dynamic selection problem; specifically the median values; pb_ds helps 140 3.9
cookieselection cookieselection 2.3k, Order Statistics Tree map large integers to up to 600K integers; use pb_ds or Fenwick Tree and the select(median) operation of Fenwick Tree 923 4.3
gcpc gcpc 2.3k, Order Statistics Tree dynamic rank problem; pb_ds helps 876 5.3
lc0100 to replace with LeetCode link soon... 2.3l, BT Exercises, E recursive check if two binary trees are the same; top-interview-150 0 2.0
lc0104 to replace with LeetCode link soon... 2.3l, BT Exercises, E recursive height check; leetcode-75; top-100-liked; top-interview-150 0 2.0
lc0236 to replace with LeetCode link soon... 2.3l, BT Exercises, E find the first vertex using postorder where both p and q are seen; leetcode-75; top-100-liked; top-interview-150 0 4.0
lc0437 to replace with LeetCode link soon... 2.3l, BT Exercises, E for each vertex, run preorder traversal; check if the path sum equals to target; leetcode-75; top-100-liked 0 4.0
lc0872 to replace with LeetCode link soon... 2.3l, BT Exercises, E run inorder traversals on both trees; picking only the leaves; compare them; leetcode-75 0 2.0
lc1372 to replace with LeetCode link soon... 2.3l, BT Exercises, E modified preorder traversal; reset counter if same direction; add counter if zig-zag-ing; leetcode-75 0 4.0
lc1448 to replace with LeetCode link soon... 2.3l, BT Exercises, E modified preorder traversal; keep the largest along the way; leetcode-75 0 4.0
lc0098 to replace with LeetCode link soon... 2.3m, BST Exercises recursive BST property validator; top-100-liked; top-interview-150 0 4.0
lc0230 to replace with LeetCode link soon... 2.3m, BST Exercises inorder traversal; report the k-th element; top-100-liked; top-interview-150 0 4.0
lc0450 to replace with LeetCode link soon... 2.3m, BST Exercises code BST deletion sub-cases; leetcode-75 0 4.0
lc0530 to replace with LeetCode link soon... 2.3m, BST Exercises the min gap is between successive elements during inorder traversal; same as LC 0783; top-interview-150 0 2.0
lc0700 to replace with LeetCode link soon... 2.3m, BST Exercises the classic BST search process; leetcode-75 0 2.0
lc0897 to replace with LeetCode link soon... 2.3m, BST Exercises create new skewed BST using inorder traversal of original BST 0 2.0
lc0938 to replace with LeetCode link soon... 2.3m, BST Exercises customize inorder traversal of BST 0 2.0
00599 Fetching from uHunt 2.4a, Graph Data Structures V-E = number of CCs; use a bitset of size 26 to count the number of vertices that have some edge 0.0
11550 Fetching from uHunt 2.4a, Graph Data Structures graph representation; incidence matrix 0.0
11991 Fetching from uHunt 2.4a, Graph Data Structures Adjacency List 0.0
abinitio abinitio 2.4a, Graph Data Structures combo: EL input, AM as working graph DS, AL output (in hash format); all operations must be O(V) or better 104 7.3
chopwood chopwood 2.4a, Graph Data Structures Prüfer sequence; use priority_queue 258 3.5
traveltheskies traveltheskies 2.4a, Graph Data Structures (graph) DS manipulation; an array of ALs (one per each day); simulate the number of people day by day 188 3.2
01197 Fetching from uHunt 2.4b, Union-Find LA 2817 - Kaohsiung03; Connected Components 0.0
01329 Fetching from uHunt 2.4b, Union-Find LA 3027 - SouthEasternEurope04; interesting UFDS variant; modify the union and find routine 0.0
10608 Fetching from uHunt 2.4b, Union-Find find the set with the largest element 0.0
10685 Fetching from uHunt 2.4b, Union-Find find the set with the largest element 0.0
almostunionfind almostunionfind 2.4b, Union-Find new operation: move; idea: do not destroy the parent array structure; also available at UVa 11987 - Almost Union-Find 618 7.0
control control 2.4b, Union-Find LA 7480 - Singapore15; simulation of UFDS; size of set; number of disjoint sets 424 4.6
ladice ladice 2.4b, Union-Find size of set; decrement one per usage 615 2.8
unionfind unionfind 2.4b, Union-Find basic UFDS; similar to UVa 00793 1086 4.8
11402 Fetching from uHunt 2.4c, Tree-related DS Segment Tree with lazy updates 0.0
11423 Fetching from uHunt 2.4c, Tree-related DS clever usage of Fenwick Tree and large array; important hint: look at the constraints carefully 0.0
12299 Fetching from uHunt 2.4c, Tree-related DS Segment Tree with a few point (not range) updates; RMQs 0.0
fenwick fenwick 2.4c, Tree-related DS basic Fenwick Tree; use long long 695 4.5
justforsidekicks justforsidekicks 2.4c, Tree-related DS use six Fenwick Trees, one for each gem type 359 3.8
moviecollection moviecollection 2.4c, Tree-related DS LA 5902 - NorthWesternEurope11; not a stack but a dynamic RSQ problem; also available at UVa 01513 - Movie collection 547 5.5
supercomputer supercomputer 2.4c, Tree-related DS easy problem if we use Fenwick Tree 760 3.8

Buy Now!


Partner Links