InterviewStack.io LogoInterviewStack.io

Algorithmic Problem Solving Fundamentals Questions

Core foundation for solving entry level algorithmic problems. Focuses on arrays, strings, basic mathematics and number theory problems, simple bit manipulation, basic linked list and tree operations, stacks and queues, basic sorting and searching algorithms, simple recursion, and use of hash based data structures for counting and lookup. Emphasizes understanding asymptotic time and space complexity, selecting appropriate data structures for a task, and clear step by step problem solving including writing a brute force solution and analyzing correctness.

EasyTechnical
0 practiced
Implement an in-place reversal of a string represented as a list of characters in Python. The function should modify the input list and use O(1) extra space. Provide an example and note any language-specific caveats if implemented in other languages (Go/Java). Example: ['s','t','a','c','k'] -> ['k','c','a','t','s'].
EasyTechnical
0 practiced
Explain the average and worst-case time and space complexity for these operations: array access, array insertion at start, appending to dynamic array, hashmap (dict) lookup/insert/delete, binary search tree lookup/insert. For each, give practical guidance for SRE use-cases where the theoretical complexity affects operational choices.
HardTechnical
0 practiced
You have three candidate strategies to deduplicate logs before indexing: (A) in-memory hashmap dedupe per worker, (B) external-sort-and-unique, (C) Bloom-filter prefilter + subsequent verification. Compare these approaches for memory, CPU, I/O, latency, and false-positive risks, and recommend one for a global SRE pipeline handling 100M log lines/hour.
EasyTechnical
0 practiced
As an SRE you receive a list of log lines (strings) from a daily batch. Each line contains a client IP. Write a Python function that counts the number of unique IP addresses in the list. Describe how you would handle very large input that doesn't fit in memory and how to estimate distinct counts approximately.
MediumTechnical
0 practiced
Perform a level-order (breadth-first) traversal of a binary tree and return the maximum depth. Implement in Python. Provide a TreeNode definition and explain how BFS can be used to compute per-level metrics such as average latency per service in a dependency tree.

Unlock Full Question Bank

Get access to hundreds of Algorithmic Problem Solving Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.