Back to course
COMP2521 · Coding Practice
Write code in the browser and autotest it against the samples instantly.
Arrays: Longest Strictly-Increasing Run
Easyc-dcc
Arrays: Reverse In Place
Easyc-dcc
AVL Tree: Self-balancing Insert
Mediumc-dcc
AVL Tree: Height After Inserts
Hardc-dcc
Complexity: Count a Triangular Double Loop
Easyc-dcc
Complexity: Multiplications in Matrix Multiply
Easyc-dcc
BST: Insert & Search
Mediumc-dcc
BST: k-th Smallest
Mediumc-dcc
Binary Tree: Height
Easyc-dcc
Binary Tree: Count Leaves
Easyc-dcc
Euler: Count Odd-Degree Vertices
Easyc-dcc
Euler: Circuit / Path / None
Easyc-dcc
BFS: Number of Reachable Vertices
Mediumc-dcc
BFS: Shortest Unweighted Distance
Mediumc-dcc
BFS: Bipartite Check
Hardc-dcc
DFS: Count Connected Components
Mediumc-dcc
DFS: Does a Path Exist
Easyc-dcc
DFS: Detect Cycle (Directed)
Hardc-dcc
Graph: Build the Adjacency Matrix
Easyc-dcc
Graph: Maximum In/Out Degree Difference
Mediumc-dcc
Hash Table: Bucket Sizes
Easyc-dcc
Hash Table: Longest Chain
Easyc-dcc
Heap: Insert (sift-up)
Mediumc-dcc
Heap: Delete-max (sift-down)
Mediumc-dcc
Heap: k-th Largest
Hardc-dcc
Linked List: Build and Print
Easyc-dcc
Linked List: Recursive Sum
Easyc-dcc
MST: Total Weight
Mediumc-dcc
MST: Largest Edge in the MST
Mediumc-dcc
Queue: Simulate Dequeue Order
Mediumc-dcc
Queue: Final Contents
Mediumc-dcc
Recursion: Factorial
Easyc-dcc
Recursion: Tower of Hanoi
Mediumc-dcc
Recursion: Subset Sum
Hardc-dcc
Sorting: Ascending Order
Easyc-dcc
Sorting: Stable Sort by Key
Mediumc-dcc
Sorting: Count Inversions
Hardc-dcc
Stack: Balanced Brackets
Mediumc-dcc
Stack: Decimal to Binary
Easyc-dcc
Tree Traversal: Pre / In / Post-order
Mediumc-dcc
Tree Traversal: Level Order (BFS)
Mediumc-dcc
Trie: count stored words
Easyc-dcc
Trie: is it a stored word
Mediumc-dcc
2-3-4 Node: which child
Easyc-dcc
2-3-4 Tree: root after insertions
Mediumc-dcc
Binary Search: Index of Target
Easyc-gcc
Stack ADT: PUSH / POP
Easyc-gcc
Stable Sort by Score
Easypython3
Priority Queue: insert / extract-max
Mediumpython3
Dijkstra: Shortest Distances from 0
Mediumpython3
Topological Order (lexicographically smallest)
Mediumpython3
21T3 Q6 — Stable sort of students
Hardc-gcc
21T3 Q7 — Is the digraph a binary tree?
Hardc-gcc
21T3 Q8 — Sum of odd values (rebuild tree)
Hardc-gcc
24T2 Q8 — Append two lists
Mediumc-gcc
21T3 Q9 — Number of reachable vertices
Hardc-gcc
24T2 Q9 — Longest increasing run
Hardc-gcc
24T2 Q10 — Max |in-deg − out-deg|
Mediumc-gcc
24T2 Q11 — Day trip
Hardc-gcc
24T2 Q12 — Min difference on a BST level
Hardc-gcc