Jiohotstar Interview Questions
- DSA
- LLD
- HLD
Q1: Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Example:
- Input: “abcabcbb”
- Output: 3 (Explanation: “abc”)
Q2: Subset Sum Exists
Given a set of integers and a target sum, determine whether a subset exists with that sum.
Example:
- Input: arr = [3, 34, 4, 12, 5, 2], sum = 9
- Output: true (4 + 5 = 9)
Q3: Minimum Deletions to Make String a Palindrome
Find the minimum number of deletions required to make a given string palindrome.
Example:
- Input: “aebcbda”
- Output: 2
- Explanation: Remove “e” and “d” → “abcba”
Q4: Keypad Letter Combinations
Given a string of digits (2–9), return all possible letter combinations that the number could represent.
Example:
- Input: “23”
- Output: [“ad”,”ae”,”af”,”bd”,”be”,”bf”,”cd”,”ce”,”cf”]
Q5: Maximum Subarray (Kadane’s Algorithm)
Find the contiguous subarray with the largest sum.
Example:
- Input: [-2,1,-3,4,-1,2,1,-5,4]
- Output: 6 (Explanation: [4,-1,2,1])
Q6: Merge K Sorted Lists
Merge k sorted linked lists into one sorted list.
Example:
- Input: [[1,4,5],[1,3,4],[2,6]]
- Output: [1,1,2,3,4,4,5,6]
Q7: Remove Element
Remove all occurrences of a given value val in-place and return the new length.
Example:
- Input: nums = [3,2,2,3], val = 3
- Output: 2 (nums = [2,2])
Q8: Implement Queue Using Stacks
Use two stacks to implement a queue with standard operations: push, pop, and peek.
Example:
- Input:
- push(1)
- push(2)
- pop() → 1
Q9: Dijkstra’s Shortest Path
Implement Dijkstra’s Algorithm to find shortest paths from a source node in a weighted graph.
Concepts Tested:
- Min-Heap
- Graph adjacency list
- Greedy property of Dijkstra
Q10: Detect Cycle in Directed Graph
Given a directed graph, determine whether it contains a cycle.
Approach:
Use DFS with a recursion stack or Kahn’s Algorithm.
Q11: Longest Palindromic Substring
Return the longest palindromic substring from a given string.
Example:
- Input: “babad”
- Output: “bab” or “aba”
Q12: Remove Invalid Parentheses
Remove the minimum number of invalid parentheses to make the string valid.
Approach:
Use BFS to generate all possible strings and track validity.
Q13: Climbing Stairs
You are climbing stairs; each time you can climb 1 or 2 steps. Find total distinct ways to reach the top.
Example:
- Input: n = 3
- Output: 3 (1+1+1, 1+2, 2+1)
Q14: Valid Sudoku Checker
Given a partially filled Sudoku, verify whether the placement is valid.
Concepts Tested:
- 2D Matrix traversal
- HashSet usage
Q1. Elevator System
Description:
Design an Elevator System with the following:
- Floor Buttons to call elevator
- Lift Buttons inside elevator
- Multiple elevator handling
Q2. Google Calendar
Design Google Calendar — support event creation, scheduling conflicts, reminders, and recurring events.
Focus Areas:
- Class structure (Event, Calendar, User)
- Scheduling conflicts
- Data modeling
Q3. Stock Exchange Order Matcher
Design a Stock Exchange System to match buy/sell orders.
Focus Areas:
- Priority Queue for matching
- Trade execution logic
- Scalability with concurrent trades
Q4. URL Shortener
Design a URL Shortening System like bit.ly.
Key Points:
- Unique short code generation
- Hashing and collision handling
- Caching & Database sharding
Q1. YouTube View Count System
Design a scalable system to display and persist video view counts in real time.
Challenges:
- Handle concurrent views (millions/sec)
- Maintain accurate count
- Ensure performance using caching (e.g., Redis) and async updates
Q2. Recommender System for Hotstar
Design a Recommendation System for Hotstar — recommend videos based on watch history and similar users.
Concepts:
- Collaborative filtering
- Distributed architecture
- Batch + Stream processing
Q3. Swiggy-like System
Design Swiggy/Zomato-like system for order management, delivery tracking, and restaurant coordination.
Concepts:
- Microservices (Order, Delivery, Payment)
- Load balancing
- Real-time notifications (Kafka)
Q4. WhatsApp Design Discussion (Managerial Round)
Asked to describe how to design a real-time chat system like WhatsApp — covering user sessions, message queues, and message delivery.
Q1. Behavioral & Managerial Topics
- Past project deep-dives (decision-making, performance, challenges).
- Handling failure or bugs in production.
- Hypothetical system scalability questions.
- “Why Hotstar?” and how you keep yourself updated with tech.