LearnFrenzy
Sign in Take a free test

Technical tests

DSA & Algorithms Online Test

Trace arrays, trees and graphs, predict program output and complete missing lines – every program is compiled and run.

Topics
12
Practice sets
36
Full mocks
2
Questions
540

Data structures and algorithms decide the coding rounds of product companies and a large share of GATE CSE marks. These tests go beyond plain MCQs: you trace arrays with pointers, read binary trees and graphs drawn on screen, predict the output of short programs in C, C++, Java and Python, and pick the line that completes an algorithm. Every program shown was compiled and run to produce its answer, and every traced answer was computed by a checker program.

Full mocks

Test yourself like the real round

DSA & Algorithms · Full Mock 1

36 questions across all twelve DSA topics – code output, traces on drawn arrays, trees and graphs, and complexity – with negative marking.

  • 36 questions
  • 50 min
  • 2 sections
  • −0.25 per wrong answer

DSA & Algorithms · Full Mock 2

36 fresh questions – no overlap with Mock 1 – from all twelve topics, from C strings and heaps to grid BFS, tries and DP.

  • 36 questions
  • 50 min
  • 2 sections
  • −0.25 per wrong answer

Topic-wise practice

Choose a topic and level

01Time and Space Complexity

Big-O of loops and recursion, counting operations, recurrences and the Master theorem, amortised cost and space used by the call stack.

  • Beginner Time Complexity · Beginner15 questions · 23 min Not started Start
  • Intermediate Time Complexity · Intermediate15 questions · 23 min Not started Start
  • Advanced Time Complexity · Advanced15 questions · 23 min Not started Start

02Arrays and Strings

Indexing and memory layout, prefix sums, two pointers, sliding window, Kadane, rotation, hashing tricks, KMP and the string pitfalls of C, C++, Java and Python.

  • Beginner Arrays & Strings · Beginner15 questions · 23 min Not started Start
  • Intermediate Arrays & Strings · Intermediate15 questions · 23 min Not started Start
  • Advanced Arrays & Strings · Advanced15 questions · 23 min Not started Start

03Linked Lists

Traversal, insertion and deletion, reversal, slow and fast pointers, cycle detection, merging, dummy nodes, k-group reversal and LRU caches.

  • Beginner Linked Lists · Beginner15 questions · 23 min Not started Start
  • Intermediate Linked Lists · Intermediate15 questions · 23 min Not started Start
  • Advanced Linked Lists · Advanced15 questions · 23 min Not started Start

04Stacks and Queues

LIFO and FIFO operations, balanced brackets, infix to postfix, monotonic stacks, deques and sliding windows, queues from stacks and circular buffers.

  • Beginner Stacks & Queues · Beginner15 questions · 23 min Not started Start
  • Intermediate Stacks & Queues · Intermediate15 questions · 23 min Not started Start
  • Advanced Stacks & Queues · Advanced15 questions · 23 min Not started Start

05Hashing

Hash functions, collisions, chaining and open addressing, load factor, hash maps and sets in Python, Java and C++, and hashing patterns such as prefix sums and rolling hashes.

  • Beginner Hashing · Beginner15 questions · 23 min Not started Start
  • Intermediate Hashing · Intermediate15 questions · 23 min Not started Start
  • Advanced Hashing · Advanced15 questions · 23 min Not started Start

06Recursion and Backtracking

Base cases and the call stack, tracing output order, Tower of Hanoi, memoisation, subsets, permutations, N-Queens, combination sum and pruning.

  • Beginner Recursion · Beginner15 questions · 23 min Not started Start
  • Intermediate Recursion · Intermediate15 questions · 23 min Not started Start
  • Advanced Recursion · Advanced15 questions · 23 min Not started Start

07Sorting and Searching

Bubble, selection, insertion, merge, quick, heap, counting and radix sort traced pass by pass, stability and in-place sorting, binary search and its variants, and library sorts.

  • Beginner Sorting & Searching · Beginner15 questions · 23 min Not started Start
  • Intermediate Sorting & Searching · Intermediate15 questions · 23 min Not started Start
  • Advanced Sorting & Searching · Advanced15 questions · 23 min Not started Start

08Trees and BST

Traversals, height and leaves, BST search, insert and delete, building trees from traversals, LCA, diameter, AVL rotations, tries and segment trees.

  • Beginner Trees & BST · Beginner15 questions · 23 min Not started Start
  • Intermediate Trees & BST · Intermediate15 questions · 23 min Not started Start
  • Advanced Trees & BST · Advanced15 questions · 23 min Not started Start

09Heaps and Priority Queues

Heap property and array layout, sift-up and sift-down, building a heap in O(n), heap sort, priority queues in Python, Java and C++, top-k, running median and merging.

  • Beginner Heaps · Beginner15 questions · 23 min Not started Start
  • Intermediate Heaps · Intermediate15 questions · 23 min Not started Start
  • Advanced Heaps · Advanced15 questions · 23 min Not started Start

10Graphs

Representations, BFS and DFS orders, connected components, cycle detection, topological sort, Dijkstra, Bellman–Ford, Floyd–Warshall, MSTs, union-find, bridges and articulation points.

  • Beginner Graphs · Beginner15 questions · 23 min Not started Start
  • Intermediate Graphs · Intermediate15 questions · 23 min Not started Start
  • Advanced Graphs · Advanced15 questions · 23 min Not started Start

11Dynamic Programming

Memoisation and tabulation, 1D problems (stairs, robber, coins, LIS), 2D tables (grid paths, LCS, edit distance, knapsack), interval DP and state design.

  • Beginner Dynamic Programming · Beginner15 questions · 23 min Not started Start
  • Intermediate Dynamic Programming · Intermediate15 questions · 23 min Not started Start
  • Advanced Dynamic Programming · Advanced15 questions · 23 min Not started Start

12Greedy and Bit Manipulation

Greedy choice and when it fails, activity selection, fractional knapsack, Huffman coding, intervals and scheduling; bitwise operators, masks, XOR tricks, counting bits and two's complement.

  • Beginner Greedy & Bits · Beginner15 questions · 23 min Not started Start
  • Intermediate Greedy & Bits · Intermediate15 questions · 23 min Not started Start
  • Advanced Greedy & Bits · Advanced15 questions · 23 min Not started Start

Search LearnFrenzy

Esc

Quick links