Amity ServiceNow DSA Preparation Roadmap

Two-pointer technique

"When you need to find a pair or compare from both ends, two pointers walking towards each other are your best friends"

Sliding window

"When you need to track a running sequence or subarray of fixed/variable size, slide a window like checking dirt on a glass pane"

Array manipulations

"Think of array elements as cards in a deck - you can shuffle, rotate, or rearrange them based on patterns"

String manipulations

"Strings are just arrays with special powers - you can slide, compare, or build them character by character"

Single Linked List

"Like a treasure hunt where each node gives you the clue to find the next one"

Double Linked List

"When you need to walk both forward and backward, like browsing history in a web browser"

Stack & Queue Operations

"Think of stacking plates - last in, first out - perfect for matching brackets or tracking history"

Tree Traversals

"Different ways to read a family tree - preorder, inorder, postorder"

BST Operations

"Every node is a gatekeeper - smaller values go left, larger values go right"

Hash Tables

"Like a library index - gives you direct access to what you're looking for"

Heaps

"A family tree where parents are always larger (or smaller) than their children"

BFS & DFS

"Explore a maze level by level (BFS) or as deep as possible (DFS)"

Shortest Path

"Like Google Maps finding the quickest route between two points"

Basic Concepts

"Write down results you've already calculated - don't solve the same math problem twice"

Advanced Patterns

"Most DP problems are variations of either choosing/not choosing items"

Greedy Algorithms

"Always pick what looks best right now"

Bit Manipulation

"Working with individual bits is like flipping switches on or off"