Skip to content
SparkTime, home

Tagged #freshers

GuideTechnology

24 min read

Graphs: Representations, BFS, and DFS

Vertices and edges, adjacency lists versus matrices, breadth-first and depth-first search, connected components, grids as graphs, and basic cycle detection in undirected and directed graphs, with complexity in terms of V and E.

GuideTechnology

20 min read

Bit Manipulation and Mathematical Patterns

Binary numbers, the bitwise operators and Java's signed-integer behaviour, then the reasoned uses: parity, powers of two, counting bits, XOR, masks and subsets, plus GCD, modular arithmetic, fast exponentiation and the sieve of Eratosthenes.

GuideTechnology

22 min read

Greedy Algorithms and Interval Problems

When picking the best-looking option at every step is actually correct, and when it is not. Learn to justify a greedy strategy, hunt for counterexamples, and solve activity selection, merge intervals, meeting rooms and jump game.

GuideTechnology

19 min read

Prefix Sums and Difference Arrays

Answer range-sum queries in constant time with a running-total array, count subarrays with a given sum using a hash map, compute product-except-self, handle 2D regions, and apply many range updates at once with a difference array.

GuideTechnology

18 min read

Sliding Window: Efficient Subarray and Substring Problems

Fixed-size and variable-size windows over arrays and strings, with running sums, counters and frequency maps. Learn the expand-and-shrink template, why it runs in O(n), and when negative numbers break it.

GuideTechnology

18 min read

Two Pointers: Solve Problems by Coordinating Indices

Replace nested loops with two indices that move in a controlled way. Learn the opposite-ends and same-direction patterns, why each pointer move is safe, and solve pair sum, container with most water, 3Sum and in-place deduplication.

GuideTechnology

22 min read

Searching and Sorting: Choose the Right Approach

Linear and binary search done right (invariants, boundaries and overflow-safe midpoints), lower and upper bound, searching on the answer, the main sorting algorithms and their trade-offs, and how to sort anything in Java with comparators.

GuideTechnology

21 min read

Heaps and Priority Queues

How a heap keeps the smallest or largest item ready in O(1), how insert and remove work in O(log n), how to use Java's PriorityQueue, and how to solve top-K, k-th largest and merge-k-sorted problems. Includes how a heap differs from a BST.

GuideTechnology

22 min read

Trees and Binary Search Trees

Tree vocabulary, the four traversals (preorder, inorder, postorder, level-order), recursive and iterative code, and binary search trees: search, insert, and the right way to validate one.

GuideTechnology

24 min read

Recursion and Backtracking

Learn to think recursively: base cases, the call stack and recursion trees. Then use backtracking (choose, explore, undo) to generate subsets, permutations and combinations, avoid duplicates, prune the search and solve N-Queens.

GuideTechnology

20 min read

Hashing: HashMap, HashSet, and Frequency Patterns

How hash tables find things almost instantly, what collisions are, how to use HashMap and HashSet in Java, and the patterns that solve duplicates, two-sum, grouping and counting problems. Includes the equals and hashCode contract.

GuideTechnology

19 min read

Stacks and Queues

Last-in-first-out and first-in-first-out, explained with real examples. Learn the right Java collections (ArrayDeque, not Stack), then solve bracket matching, round-robin scheduling and next-greater-element with a monotonic stack.

GuideTechnology

20 min read

Linked Lists: Nodes, Pointers, and Pointer Reasoning

Build singly and doubly linked lists from scratch in Java, learn to reason about pointer changes step by step, and solve reversal, middle-finding, merging and cycle detection with clear diagrams and dry runs.

GuideTechnology

20 min read

Arrays and Array-Based Problem Solving

How arrays work in memory, why indexing is instant but inserting is slow, and how to solve the classic array problems: maximum, frequency counting, in-place rotation, moving zeroes and subarray sums.

GuideTechnology

19 min read

Time and Space Complexity Without the Confusion

Big O explained by counting steps: constant, logarithmic, linear, n log n, quadratic and exponential growth, best, average and worst cases, auxiliary and recursion-stack space, with dry runs you can check yourself.

GuideTechnology

21 min read

Java Essentials for DSA

Only the Java you need for data structures and algorithms: types and overflow, loops, methods, arrays, strings, a small class, input and output, and the mistakes that trip up almost every beginner.