Adobe Interview Questions
- DSA
- LLD
- HLD
Q1: Middle Node of Linked List
Find the middle node of a singly linked list. This is a classic pointer problem that helps test your ability to traverse lists and work with edge cases, especially odd/even length lists.
Example:
Input: head =
Output: 3
Explanation: Traverse with slow and fast pointers; slow is at 3 when fast reaches end.
Q2: Reverse a Linked List
Reverse a singly linked list in place—useful for testing loop logic and understanding of pointer manipulation.
Example:
Input: head =
Output:
Explanation: Iteratively change pointers or use recursion to flip the list.
Q3: Maximum Subarray Sum
Find the sum of the contiguous subarray within a one-dimensional array of numbers which has the largest sum.
Example:
Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
Output: 6
Explanation: The optimal subarray is [4,-1,2,1].
Q4: Two Sum
Given an array of integers, return indices of two numbers that add up to a specific target. This question focuses on hash map use and basic logic.
Example:
Input: nums = , target = 9
Output:
Explanation: nums+nums=2+7=9.
Q5: Distinct Ways to Climb Stairs
Given n steps, return how many distinct ways to climb to the top. Highlights dynamic programming basics.
Example:
Input: n = 4
Output: 5
Explanation: Possible ways: [1+1+1+1], [2+1+1], [1+2+1], [1+1+2], [2+2].
Q6: Merge Two Sorted Linked Lists
Merge two sorted linked lists and return as one sorted list. Checks recursion and pointer logic.
Example:
Input: l1 = , l2 =
Output:
Explanation: Merge by comparing node values recursively.
Q7: Check Linked List Cycle
Detect if a singly linked list has a cycle using Floyd’s Tortoise and Hare algorithm. Tests understanding of fast/slow pointers.
Example:
Input: head = [3,2,0,-4] (tail connects to index 1)
Output: true
Explanation: Fast and slow pointers eventually meet if there’s a cycle.
Q8: Validate Parentheses
Verify if the input string containing brackets is valid (all opening matched with closing in order). Classic stack problem.
Example:
Input: s = “()[]{}”
Output: true
Explanation: Each open bracket is matched/correctly closed.
Q9: Implement Queue Using Two Stacks
Build a queue using two stacks. Focuses on data structure transformation and algorithmic ingenuity.
Example:
Input: push(1), push(2), pop()
Output: 1
Explanation: Move elements between stacks to simulate queue behavior.
Q10: First Unique Character in a String
Find the first unique character in a string and return its index. Best solved with hash maps.
Example:
Input: s = “loveleetcode”
Output: 2
Explanation: The character ‘v’ at index 2 is the first unique.
Q1. Design LRU Cache
Build a Least Recently Used (LRU) cache supporting get and put in O(1) time. This is a system-level design question that checks your ability to combine hash map and doubly-linked list concepts.
Example:
Input: put(1, 1), put(2, 2), get(1), put(3, 3), get(2), put(4, 4), get(1), get(3), get(4)
Output: [1, -1, -1, 3, 4]
Explanation: Oldest used entries are evicted as capacity is filled; accesses change usage order.
Q2. Chess Game OOP Design
Design classes and interfaces for a chess game. You’ll need to model core components, inheritance for pieces, and relationships for gameplay.
Example:
Input: Move pieces on board, checkmate scenario
Output: Classes for Piece, Board, Game, Move, etc.
Explanation: Use OOP—base class for Piece, derived classes for King, Queen, etc., Board tracks piece locations.
Q3. API for Game Player Scores
Design an API to monitor scores for k users in a game and find the lowest score. This requires database modeling, efficient querying, and abstraction.
Example:
Input: updateScore(userID, score)
Output: getLowestScore() ⇒ lowest score value
Explanation: Use a priority queue or sorted collection for fast retrieval.
Q4. Trie (Prefix Tree) Implementation
Construct a trie (prefix tree) supporting insert, search, and prefix check operations.
Example:
Input: insert(“apple”), search(“apple”), startsWith(“app”)
Output: [true, true]
Explanation: Tree-like structure enables fast word/prefix queries.
Q5. Implement Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Example:
Input: push(-2), push(0), push(-3), getMin(), pop(), top(), getMin()
Output: [-3, 0, -2]
Explanation: Maintain auxiliary stack with current mins at every stage.
Q1. Frontend Architecture: React + Webpack
Design a scalable frontend architecture using React and Webpack. Assess modularity, build optimization, and maintainable code splitting.
Example:
Input: Application modules/components structure, routing
Output: Build pipeline setup, component hierarchy
Explanation: Organize React components by feature; use Webpack plugins for code splitting, caching, and performance.
Q2. Backend RESTful API for Analytics
Design a RESTful API backend that supports robust analytics for millions of users. You’ll need to plan endpoints, security, and scalability.
Example:
Input: GET /analytics?user={id}
Output: JSON payload of user actions, stats
Explanation: Service layer fetches data from DB, applies business rules, returns analytics as RESTful responses.
Q3. Linux Server Operations: Troubleshooting and CI/CD
Outline your approach to managing Linux servers, troubleshooting system operations, and implementing CI/CD pipelines for reliable deployments.
Example:
Input: Deploy code, handle outage, automate builds.
Output: Automated deployment flow, system logs capturing error, rollback plans.
Explanation: Setup deployment scripts, monitoring; quickly diagnose issues, automate recovery.
Q4. Security/Cloud Architecture
Discuss how to secure a cloud application—cover authentication, authorization, encryption, and compliance with standards.
Example:
Input: Secure APIs, encrypt data, manage user roles
Output: Diagrams for access control, encrypted storage, authentication logic
Explanation: Apply best practices/industry standards for “security at every layer” in cloud.