Primitive Types
byte (8-bit), short (16-bit), int (32-bit), long (64-bit), float, double, boolean, char
Reference Types
String, Array, List, Map, Set, Object
Variable Declaration Examples
int age = 25;
long largeNum = 1000000L;
double price = 99.99;
String name = "Amir";
boolean isActive = true;
int[] arr = new int[5];
for Loop
for (int i=0; i
while Loop
while (condition) — execute while true. Used for unknown iterations
Enhanced for
for (int x : arr) — iterate through arrays/collections. Cleaner syntax
Loop Examples
// Traditional for loop
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
// While loop
int i = 0;
while (i < 5) {
System.out.println(i++);
}
Declaration
int[] arr = new int[5]; or int[] arr = {1,2,3,4,5};
Access
arr[0] = 10; — index starts at 0. arr.length gives size
2D Array
int[][] matrix = new int[3][3]; — rows x columns
Array Example
int[] numbers = {10, 20, 30};
System.out.println(numbers[0]); // Output: 10
System.out.println(numbers.length); // Output: 3
Immutable
Strings cannot be changed. Each modification creates new String object
Common Methods
length(), charAt(i), substring(), indexOf(), toCharArray(), split()
StringBuilder
Use for multiple concatenations. Mutable alternative to String
String Examples
String str = "Hello";
int len = str.length(); // 5
char ch = str.charAt(0); // 'H'
String sub = str.substring(0, 3); // "Hel"
Encapsulation
Private variables, public getters/setters. Data hiding
Inheritance
extends keyword. Child inherits parent properties
Polymorphism
Method overriding. Same method name, different behavior
Abstraction
abstract class/interface. Hide implementation details
List (Ordered)
ArrayList, LinkedList. Duplicates allowed. add(), get(), remove()
Set (Unique)
HashSet, TreeSet. No duplicates. add(), contains(), remove()
Map (Key-Value)
HashMap, TreeMap. Key-value pairs. put(), get(), remove()
Queue
PriorityQueue, LinkedList. FIFO. offer(), poll(), peek()
Try-Catch-Finally Pattern
try {
// Code that might throw exception
int result = 10 / 0;
} catch (ArithmeticException e) {
System.out.println("Error: " + e.getMessage());
} finally {
System.out.println("Cleanup");
}
checked vs unchecked
Checked: IOException, SQLException (must handle). Unchecked: NullPointerException, ArrayIndexOutOfBoundsException
❌ Null Pointer Exception
String str = null; str.length(); — Always check null before using
❌ Array Index Out of Bounds
arr[arr.length] — Index goes 0 to length-1
✅ Use ArrayList over Array
ArrayList is dynamic, easier to manipulate than fixed-size arrays
✅ Prefer for-each loop
for (int x : arr) is cleaner than traditional for loop
Time Complexity · Space Complexity · Big O Notation · Analysis Basics
O(1) Constant
Accessing array element by index. No loop. Fastest
O(log n) Logarithmic
Binary search. Divide & conquer. Very fast
O(n) Linear
Single loop through n elements. Normal
O(n log n) Linearithmic
Merge sort, Quick sort. Good for sorting
O(n²) Quadratic
Nested loops. Bubble sort. Acceptable for small n
O(2ⁿ) Exponential
Recursive without memoization. Very slow
O(n!) Factorial
Permutations. Extremely slow. Avoid
Complexity Comparison & Use Cases
| Complexity | n=10 | n=100 | n=1000 | Rating |
| O(1) | 1 | 1 | 1 | 🟢 Excellent |
| O(log n) | 3 | 7 | 10 | 🟢 Excellent |
| O(n) | 10 | 100 | 1000 | 🟢 Good |
| O(n log n) | 30 | 700 | 10K | 🟢 Good |
| O(n²) | 100 | 10K | 1M | 🟡 Okay |
| O(n³) | 1K | 1M | 1B | 🟡 Slow |
| O(2ⁿ) | 1K | 1e30 | ∞ | 🔴 Very Slow |
How to Analyze Time Complexity
Step 1: Count Basic Operations
Assignment, comparison, arithmetic — each is O(1)
Step 2: Count Loops
Single loop = O(n). Nested loop = O(n²). Nested 3x = O(n³)
Step 3: Drop Constants
O(2n) = O(n). O(n + 100) = O(n). Only highest order matters
Step 4: Drop Lower Order
O(n² + n) = O(n²). O(n log n + n) = O(n log n)
Analysis Example
for (int i = 0; i < n; i++) { // Loop n times
for (int j = 0; j < n; j++) { // Inner loop n times
arr[i][j] = 0; // O(1)
}
}
// Total: n * n * 1 = O(n²)
Space Complexity Analysis
O(1) Constant Space
No extra space. Variables only. Best for interviews
O(n) Linear Space
Extra array/list of size n. Common trade-off
O(log n) Space
Recursion depth. Binary search: log n call stack
O(n²) Quadratic Space
2D array or nested structures. Avoid if possible
💡 Interview Tip: Always state both time & space complexity. Space-optimized solutions (O(1) space) impress interviewers more than brute force O(n) space solutions.
Data Structures · Arrays to Graphs · Complete Implementation & Analysis
Arrays · Fixed Size · Index-Based Access · Foundation of DSA
Definition
Contiguous memory storing same type elements. Access by index (0-based)
Real-World Use
Test case data, API response arrays, log entries, dynamic lists
| Operation | Time | Space |
| Access arr[i] | O(1) | — |
| Search (unsorted) | O(n) | — |
| Insert | O(n) | O(1) |
| Delete | O(n) | O(1) |
Common Array Patterns
// Array creation & traversal
int[] arr = {1, 2, 3, 4, 5};
// Forward traversal
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i]);
}
// Reverse traversal
for (int i = arr.length - 1; i >= 0; i--) {
System.out.println(arr[i]);
}
Strings · Immutable Character Arrays · Critical for Coding Rounds
Immutable
Cannot change. String s = "hello"; s.toUpperCase() returns new String
Common Methods
length(), charAt(i), substring(start,end), indexOf(), toCharArray(), split()
| Method | Example | Result |
| length() | "hello".length() | 5 |
| charAt(0) | "hello".charAt(0) | 'h' |
| substring(0,3) | "hello".substring(0,3) | "hel" |
| indexOf('l') | "hello".indexOf('l') | 2 |
String Problem: Reverse String
Problem: Reverse "hello" to "olleh"
public static String reverseString(String s) {
int n = s.length();
String result = "";
for (int i = n - 1; i >= 0; i--) {
result += s.charAt(i);
}
return result;
}
// Time: O(n) | Space: O(n)
HashMap · Key-Value Pairs · Most Important for Interviews
Definition
Hash table storing key-value pairs. Uses hash function for O(1) lookup
Real-World
Count frequency, cache results, API rate limiting, test data mapping
| Operation | Time (Avg) | Time (Worst) |
| get(key) | O(1) | O(n) |
| put(k,v) | O(1) | O(n) |
| remove(key) | O(1) | O(n) |
| containsKey | O(1) | O(n) |
HashMap Example: Character Frequency
Count each character in "hello"
public static Map<Character, Integer> countFrequency(String s) {
Map<Character, Integer> map = new HashMap<>();
for (char c : s.toCharArray()) {
map.put(c, map.getOrDefault(c, 0) + 1);
}
return map;
}
// Output: {h=1, e=1, l=2, o=1}
// Time: O(n) | Space: O(k) where k=unique chars
Stack · LIFO (Last In First Out) · Essential for Recursion & DFS
Definition
LIFO structure. Last element added is first to be removed
Operations
push(x) — add, pop() — remove top, peek() — view top, isEmpty()
Real-World
Browser back button, undo functionality, expression evaluation
| Operation | Time | Space |
| push(x) | O(1) | O(1) |
| pop() | O(1) | O(1) |
| peek() | O(1) | — |
Stack Example: Valid Parentheses
Check if brackets are balanced: "(())" valid, "())" invalid
public static boolean isValid(String s) {
Stack<Character> st = new Stack<>();
for (char c : s.toCharArray()) {
if (c == '(' || c == '{' || c == '[') {
st.push(c);
} else {
if (st.isEmpty()) return false;
st.pop();
}
}
return st.isEmpty();
}
// Time: O(n) | Space: O(n)
Queue · FIFO (First In First Out) · Used in BFS & Scheduling
Definition
FIFO structure. First element added is first to be removed
Operations
offer(x)/add(x) — add, poll()/remove() — get & remove, peek()
Real-World
Job scheduling, print queue, BFS graph traversal, message queues
| Operation | Time |
| offer(x) | O(1) |
| poll() | O(1) |
| peek() | O(1) |
Queue Example: BFS (Breadth-First Search)
Traverse tree level by level
Queue<Integer> q = new LinkedList<>();
q.offer(root);
while (!q.isEmpty()) {
int node = q.poll();
System.out.println(node);
if (node.left != null) q.offer(node.left);
if (node.right != null) q.offer(node.right);
}
// Time: O(n) | Space: O(w) where w=max width
Linked List · Dynamic Size · Pointer-Based Structure
Definition
Chain of nodes. Each node has data & next pointer. Dynamic allocation
Operations
Insert head O(1), Insert middle O(n), Delete O(n), Search O(n)
Real-World
LRU Cache, browser history, memory allocation, skip lists
| Operation | Time |
| Access i-th | O(n) |
| Search | O(n) |
| Insert at head | O(1) |
| Delete at head | O(1) |
Linked List Node Definition & Traversal
Define node & traverse list
class Node {
int data;
Node next;
public Node(int data) {
this.data = data;
this.next = null;
}
}
// Traverse linked list
while (head != null) {
System.out.println(head.data);
head = head.next;
}
Trees · Binary Tree · BST · Heap · Hierarchical Data Structure
Root
Top node with no parent. Starting point for traversal
Leaf
Node with no children. Terminal node
Height
Longest path from node to leaf. Root height = depth of tree
Balanced
Height difference between left & right ≤ 1. AVL, Red-Black trees
In-Order (LNR)
Left → Node → Right. For BST gives sorted sequence
Pre-Order (NLR)
Node → Left → Right. Root visited first
Post-Order (LRN)
Left → Right → Node. Root visited last
Level-Order (BFS)
Level by level using Queue. Breadth-first
Time & Space: O(n) for all traversals
Recursive approach: Left → Node → Right
public static void inOrder(TreeNode root) {
if (root == null) return;
inOrder(root.left);
System.out.println(root.val);
inOrder(root.right);
}
// For BST: 1 → 2 → 3 → 4 → 5 (sorted)
Level-Order Traversal (BFS)
Using Queue for breadth-first
public static void levelOrder(TreeNode root) {
Queue<TreeNode> q = new LinkedList<>();
q.offer(root);
while (!q.isEmpty()) {
TreeNode node = q.poll();
System.out.println(node.val);
if (node.left != null) q.offer(node.left);
if (node.right != null) q.offer(node.right);
}
}
Graphs · Complex Data Structure · DFS & BFS Applications
Definition
Nodes & Edges. Can be directed/undirected, weighted/unweighted
Representation
Adjacency List (preferred), Adjacency Matrix, Edge List
Real-World
Social networks, web crawling, maps, dependency resolution
Recursive approach: Go deep first
public static void dfs(int node, List[] adj, boolean[] vis) {
vis[node] = true;
System.out.println(node);
for (int neighbor : adj[node]) {
if (!vis[neighbor]) {
dfs(neighbor, adj, vis);
}
}
}
// Time: O(V+E) | Space: O(V)
Coding Patterns · Sliding Window · Two Pointer · Binary Search · DP
Sliding Window · Efficient for Subarray/Substring Problems
Concept
Use 2 pointers to maintain a window. Expand & contract window
When to Use
Subarray/substring with condition. Multiple loops reduction from O(n²) to O(n)
Problems
Longest substring without repeating chars, Max sum subarray, Contains duplicate II
EasyPattern-1
Example: Longest Substring Without Repeating
Find length of longest substring with unique characters
public static int lengthOfLongestSubstring(String s) {
Map<Character, Integer> map = new HashMap<>();
int left = 0, maxLen = 0;
for (int right = 0; right < s.length(); right++) {
if (map.containsKey(s.charAt(right))) {
left = Math.max(left, map.get(s.charAt(right)) + 1);
}
map.put(s.charAt(right), right);
maxLen = Math.max(maxLen, right - left + 1);
}
return maxLen;
}
// Time: O(n) | Space: O(min(m,n))
Two Pointer · Sorted Arrays · Efficient for Finding Pairs
Concept
Start from opposite ends or same start. Move based on condition
When to Use
Sorted array problems. Find pairs/triplets/k-sums
Problems
Two Sum II, Valid Palindrome, Container With Most Water
MediumPattern-2
Example: Two Sum (Sorted Array)
Find 2 numbers that add up to target. Return indices
public static int[] twoSum(int[] nums, int target) {
int left = 0, right = nums.length - 1;
while (left < right) {
int sum = nums[left] + nums[right];
if (sum == target) return new int[]{left, right};
else if (sum < target) left++;
else right--;
}
return new int[]{-1, -1};
}
// Time: O(n) | Space: O(1)
Binary Search · Divide & Conquer · O(log n) Efficiency
Concept
Divide sorted array in half. Eliminate half based on target
When to Use
Sorted array/matrix. Find target, peak, rotated array
Time
O(log n). Much faster than linear O(n)
EasyPattern-3
Example: Binary Search on Sorted Array
Find target value in sorted array
public static int binarySearch(int[] nums, int target) {
int left = 0, right = nums.length - 1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (nums[mid] == target) return mid;
else if (nums[mid] < target) left = mid + 1;
else right = mid - 1;
}
return -1;
}
// Time: O(log n) | Space: O(1)
Dynamic Programming · Memoization · Optimal Substructure
Concept
Break problem into overlapping subproblems. Store results to avoid recomputation
2 Approaches
Top-Down (Memoization) + Bottom-Up (Tabulation)
When to Use
Fibonacci, coin change, LCS, knapsack, longest increasing subsequence
HardPattern-5
Example: Fibonacci with Memoization
Calculate nth Fibonacci number efficiently
public static int fib(int n, Map<Integer, Integer> memo) {
if (n <= 1) return n;
if (memo.containsKey(n)) return memo.get(n);
int result = fib(n - 1, memo) + fib(n - 2, memo);
memo.put(n, result);
return result;
}
// Time: O(n) | Space: O(n)
Top LeetCode Problems · Easy to Hard · Company Frequencies
Easy Problems · Foundation Building · 15-20 Minutes Per Problem
1. Two Sum
LeetCode #1 · Hash Map Pattern
Find two numbers in array that add to target. Return indices.
Easy
2. Contains Duplicate
LeetCode #217 · Hash Set Pattern
Return true if array has duplicate elements. Use Set for O(1) lookup
Easy
3. Valid Palindrome
LeetCode #125 · Two Pointer Pattern
Check if string is palindrome ignoring spaces & special chars
Easy
4. Best Time to Buy/Sell Stock
LeetCode #121 · One Pass Pattern
Find max profit from stock prices. O(n) single pass solution
Easy
5. Reverse String
LeetCode #344 · Two Pointer String
Reverse character array in-place. Must be O(1) space
Easy
6. Majority Element
LeetCode #169 · Boyer-Moore Voting
Find element appearing > n/2 times. Optimal O(1) space
Easy
7. Merge Sorted Array
LeetCode #88 · Two Pointer Merge
Merge two sorted arrays in-place. Start from end
Easy
8. Remove Duplicates From Sorted Array
LeetCode #26 · Two Pointer In-Place
Remove duplicates in-place. Return length of unique elements
Easy
9. Valid Parentheses
LeetCode #20 · Stack Pattern
Check if brackets are properly closed. Use Stack
Easy
10. Binary Search
LeetCode #704 · Classic Binary Search
Find target in sorted array. O(log n) solution
Easy
Medium Problems · Interview Favorites · 25-35 Minutes Per Problem
11. Longest Substring Without Repeating
LeetCode #3 · Sliding Window (IMPORTANT)
Find longest substring with unique characters. Use HashMap + sliding window
Medium
12. Maximum Product Subarray
LeetCode #152 · DP with State
Find contiguous subarray with max product. Track max & min
Medium
13. Minimum Window Substring
LeetCode #76 · Sliding Window (HARD)
Find minimum window containing all target chars. Tricky sliding window
Hard Pattern
14. Three Sum
LeetCode #15 · Two Pointer + Loop
Find all unique triplets that sum to 0. Two pointer inside loop
Medium
15. Coin Change
LeetCode #322 · DP Optimization (CLASSIC)
Min coins to make amount. DP bottom-up tabulation
Medium
16. Number of Islands
LeetCode #200 · DFS/BFS (IMPORTANT)
Count islands in 2D grid. Use DFS for connected components
Medium
17. Longest Increasing Subsequence
LeetCode #300 · DP Classic
Find length of LIS. DP approach O(n log n) optimal
Medium
18. Evaluate Reverse Polish Notation
LeetCode #150 · Stack Applications
Calculate math expression from postfix notation. Use Stack
Medium
19. Binary Tree Level Order Traversal
LeetCode #102 · BFS on Trees
Traverse tree level by level. Return list of lists
Medium
20. Lowest Common Ancestor
LeetCode #236 · Tree Recursion
Find LCA of two nodes in binary tree. Recursive approach
Medium
Hard Problems · Interview Whiteboard · 40+ Minutes
Advanced Hard Problems (Solve 3-5 before interviews)
21. Trapping Rain Water
LeetCode #42 · Two Pointer / Stack
Calculate water trapped after rainfall. O(n) optimal
Hard
22. Word Ladder II
LeetCode #126 · BFS + Backtracking
Find all shortest paths to transform word. Complex BFS
Hard
23. Alien Dictionary
LeetCode #269 · Topological Sort
Find alien language order from word list. Graph + topo sort
Hard
24. Regular Expression Matching
LeetCode #10 · DP Hard
Match string with regex pattern. Complex DP states
Hard
25. Merge K Sorted Lists
LeetCode #23 · Heap / Divide & Conquer
Merge k linked lists. Use Min-Heap for efficiency
Hard
SDET-Specific DSA Interview Questions · Framework & Automation Focus
Framework Optimization Patterns
Q: Parallel Test Execution
How to distribute test cases across threads? Use ThreadPoolExecutor, manage shared state with ConcurrentHashMap, ensure thread-safety. Real: Run 100 tests in 5 threads = 20 per thread
Q: Retry Failed Tests
Implement exponential backoff for flaky tests. Use Queue for retry logic, priority queue for failed tests priority
Q: Test Report Generation
Store results in HashMap. Aggregate O(n) complexity. Sort by status/duration
Q: Parse API Response JSON
Extract nested values. HashMap for key-value, ArrayList for arrays. Handle null safely. Complexity O(n)
Q: CSV/Excel Log Processing
Read test logs into List. Filter errors: O(n). Find duplicates: O(n) with HashSet
Q: Match Expected vs Actual
Compare API response fields. Use HashMap for validation. Diff algorithm for assertions
Real SDET Interview Scenario 1
Design: Test Retry Mechanism
Problem: Flaky tests fail randomly. Design a retry system.
class TestRetryManager {
private Queue<TestCase> failedTests = new LinkedList<>();
private Map<String, Integer> retryCount = new HashMap<>();
private static final int MAX_RETRIES = 3;
public void retryFailedTests() {
while (!failedTests.isEmpty()) {
TestCase test = failedTests.poll();
int count = retryCount.getOrDefault(test.name, 0);
if (count < MAX_RETRIES) {
test.run();
if (test.failed()) {
failedTests.offer(test);
retryCount.put(test.name, count + 1);
}
}
}
}
}
// Time: O(n*m) where m=max retries | Space: O(n)
Real SDET Interview Scenario 2
Design: Test Result Aggregation & Reporting
Problem: Collect test results from 10 threads, generate report with stats.
class TestReporter {
private Map<String, TestResult> results = new ConcurrentHashMap<>();
public void reportResult(String name, TestResult result) {
results.put(name, result);
}
public void printStats() {
int passed = 0, failed = 0;
for (TestResult r : results.values()) {
if (r.isPassed()) passed++;
else failed++;
}
System.out.println("Passed: " + passed + " Failed: " + failed);
}
}
// Time: O(n) | Space: O(n) | Thread-Safe
System Design for SDET · Architecture · Scalability · Best Practices
Framework Architecture Design
Component 1: Test Manager
Orchestrates test execution. Controls threading, retry logic, sequencing
Component 2: Data Layer
HashMap for test data. JSON parsing for API responses. Database connection pooling
Component 3: Reporter
Collects results. Generates HTML/JSON reports. ConcurrentHashMap for thread-safety
Component 4: CI/CD Integration
Jenkins pipeline. Docker containers. Artifact storage. Log aggregation
Parallel Execution Design
Approach 1: Thread Pool
ExecutorService with fixed thread pool. Distribute n tests across m threads. O(n/m) speedup
Approach 2: Grid Distribution
Selenium Grid / Appium Server. Multiple machines. Centralized node tracking
Thread Safety
Use ConcurrentHashMap, CopyOnWriteArrayList. Avoid data race conditions
// Thread Pool: 4 threads for 100 tests = 25 tests/thread
ExecutorService executor = Executors.newFixedThreadPool(4);
for (TestCase test : tests) {
executor.execute(() -> test.run());
}
executor.shutdown();
API Response Validation Design
Parsing: Use Map
Parse JSON to Map. Extract nested values using dot notation
Validation: Schema Check
Compare actual response schema with expected. Field count, types, required fields
Data Assertion
Assert field values. Handle null, empty arrays, dynamic values
Performance & Reliability
Timeout Management
Set appropriate timeouts. Use exponential backoff for retries
Resource Management
Close connections properly. Use try-with-resources. Monitor memory
Failure Handling
Graceful degradation. Log errors comprehensively. Enable debugging
90-Day DSA Mastery Roadmap · Structured Learning · Daily Commitment
📅 COMPLETE 90-DAY ROADMAP
Month 1: Foundation (Days 1-30)
Week 1: Java Basics
Variables, loops, arrays, strings. Solve 3 easy problems daily
Week 2: Complexity Analysis
Big O, time/space analysis. Analyze 5 code snippets daily
Week 3: Arrays & Strings
Array operations, string manipulation. 2 easy problems + 1 medium daily
Week 4: Hashing Basics
HashMap, HashSet concepts. Character frequency, two sum problems
Target: Solve 30-40 Easy problems. Understand fundamentals
Month 2: Core Patterns (Days 31-60)
Week 5: Stack & Queue
Valid parentheses, BFS, DFS concepts. Practice recursive thinking
Week 6: Linked Lists
Node operations, reversal, cycle detection. 10 problems
Week 7: Trees & Graphs
Traversals, BST, DFS/BFS. Level-order, inorder, preorder
Week 8: Two Pointers & Sliding Window
Pattern mastery. Solve 15 medium problems
Target: Solve 40-50 Medium problems. Know 2-3 patterns well
Month 3: Advanced & Interview Prep (Days 61-90)
Week 9: Binary Search & Sorting
BST problems, rotated arrays, merge sort. 10 medium/hard
Week 10: Dynamic Programming
Fibonacci, coin change, LCS. Bottom-up DP approach. 10 hard
Week 11: Mock Interviews
Solve hard problems under 45-minute time limit. Record solutions
Week 12: Company-Specific & SDET Focus
Amazon/Google frequent questions. SDET-specific scenarios
Target: Solve 20-30 Hard problems. Confidence in interviews
Daily (1.5-2 hours)
Morning: Concept review (30 min). Solve 2-3 problems (60 min). Debug & optimize (15 min)
Weekly (3-4 hours)
Monday: New topic learning. Wed: Practice pattern-based problems. Sat: Mock interview
Monthly Milestone
Review mistakes. Identify weak patterns. Adjust plan. Mock technical round
Total commitment: ~15 hours/week for 12 weeks = 180 hours
🎯 Success Metrics:
✓ Solve 100-120 LeetCode problems (40 Easy, 50 Medium, 20-30 Hard)
✓ Understand 8-10 core patterns deeply
✓ Code fluency: Write solution in 15-30 min per problem
✓ Explain time/space complexity instantly
✓ Apply patterns to SDET-specific scenarios
✓ Pass 3+ mock interviews confidently
Company-Wise Interview Preparation · Focus Areas & Difficulty Levels
Focus: 2-Pointer, DP, Trees
Two Sum, LIS, LCA, Number of Islands. Medium difficulty mostly
Rounds: 3-4 coding
45 min each. Need to discuss complexity deeply
SDET Specific
Parallel execution, test scheduling, data validation APIs
MediumPattern-Heavy
Focus: Graph, Hard Patterns, Optimization
Alien Dictionary, Trapping Rain Water, Complex DP
Rounds: 4+ coding
Need to solve hard problems quickly. Optimize proactively
SDET Specific
Scalability at Google scale, distributed testing, optimization
HardOptimization
Focus: Arrays, Strings, Trees
Mostly medium. Clean code emphasis. Good communication
Rounds: 3 coding
Follow-ups common. Can ask about edge cases
SDET Specific
Cross-platform testing, Azure integration, test analytics
MediumCode Quality
Product Companies (TCS, Infosys, Accenture)
Focus: Data Structures Basics
Arrays, Strings, basic LinkedList. Mostly Easy-Medium
Rounds: 1-2 coding
Less rigorous. More focus on fundamentals & communication
SDET Specific
Performance testing, load testing framework design, test data generation
Easy-MediumFundamentals
Final Interview Tips · Do's & Don'ts · Success Strategies
✓ Ask Clarifying Questions
"Can array have duplicates?" "What's the range of n?" Saves mistakes
✓ Start with Brute Force
Get working solution first. Then optimize. Interviewers like this approach
✓ Explain Your Approach
Walk through logic before coding. Makes thinking process clear
✓ Write Clean Code
Good variable names, proper indentation, comments where complex
✓ Test Your Code
Test with examples, edge cases, empty/single input, large input
✓ State Complexity
Always mention time & space. Shows you think about efficiency
✓ Mention SDET Experience
Connect solutions to real automation problems you've solved
✗ Jump to Coding
Never code immediately. Think → Explain → Code → Test
✗ Ignore Edge Cases
Empty array, null, single element, duplicates — test all
✗ Nervous Silence
Keep talking. Even if stuck, explain your thinking process
✗ Forget Time Complexity
Worst: Being asked "What's the time complexity?" and not knowing
✗ Copy-Paste Code
Write from memory. Understand every line. Know what APIs do
✗ No Follow-Ups
Ask "Can I optimize further?" Shows you want excellence
✗ Overcomplicating
If brute force works, that's OK. Optimize only if asked