Directi Interview Questions and Answers
Last updated 2026-11-19
Directi is an Indian internet products group, and its engineering interviews are commonly described as algorithm-heavy and design-heavy, with an emphasis on writing clean working code and reasoning about edge cases. This page offers practice questions in that style, with worked answers.
These are practice questions on commonly reported themes, not real papers. For timed algorithm practice see Directi coding round questions, and for design practice read how to crack the system design interview.
Rounds as commonly reported
Candidate accounts describe an online or written programming round, then several technical interviews. Early rounds are algorithmic problems that you code fully, often with a follow-up on efficiency. Later rounds add object-oriented design (design a game, a booking system, a cache), puzzles, and for experienced engineers a system design discussion. A final conversation covers motivation and fit. Directi has not published a fixed process, so use this as a rough pattern.
What interviewers look for
Working code that handles empty input and boundaries, clear naming, and the ability to improve a first solution. For design questions, they look for sensible class boundaries and extensibility rather than pattern name-dropping.
Hiring status
We hold no sourced hiring dates, numbers or process facts for Directi and there is no /hiring page for it on this site, so none are stated. Check the company's own careers site for current roles.
Directi Interview Questions and Answers: questions with worked answers
1 Design a tic-tac-toe game (low-level design).
mediumClasses: Board (n by n grid), Player (name and mark), Game (turn handling and status) and a result enum. Make move validation return an error rather than throw for normal cases. Detect the winner in O(1) per move by keeping row, column and two diagonal counters per player: add one for the mover, and a counter reaching n means a win. Keep the board size and win length as parameters so the design extends to larger boards, and separate input handling from game rules so a bot player can be added.
2 Design an elevator system.
hardEntities: Elevator (current floor, direction, stop set, state), Request (external call from a floor with a direction, or internal destination) and a Controller that assigns requests. Each elevator serves its stops in the current direction (like the SCAN disk algorithm) and reverses at the last stop. The controller picks the elevator minimising estimated wait: prefer one already moving toward the caller in the same direction, else the nearest idle one. Use a state pattern for moving, idle and door states, and a strategy for dispatching.
3 Find the longest increasing path in a matrix.
hardDFS with memoisation: dp[r][c] is the longest increasing path starting at the cell. For each neighbour with a larger value, take one plus its dp. Each cell is computed once, so O(rows times cols). No visited set is needed because strictly increasing values prevent cycles. Mistake: running a plain DFS without memoisation, which is exponential.
pythondef longest_path(m): R, C = len(m), len(m[0]) memo = {} def dfs(r, c): if (r, c) in memo: return memo[(r, c)] best = 1 for dr, dc in ((1,0),(-1,0),(0,1),(0,-1)): a, b = r + dr, c + dc if 0 <= a < R and 0 <= b < C and m[a][b] > m[r][c]: best = max(best, 1 + dfs(a, b)) memo[(r, c)] = best return best return max(dfs(r, c) for r in range(R) for c in range(C))4 Explain the difference between a mutex and a semaphore.
mediumA mutex provides mutual exclusion and has an owner: the thread that locks it must unlock it. A semaphore is a counter that allows up to N concurrent holders and can be signalled by a different thread, so it suits resource pools and producer-consumer signalling. A binary semaphore looks like a mutex but has no ownership, which makes priority inheritance and recursive locking harder to define.
5 How would you implement a thread-safe singleton in Java?
mediumThe simplest safe form is a static holder class or an enum with one instance: class loading guarantees thread-safe lazy initialisation. Double-checked locking also works if the instance field is volatile, so other threads never see a partly constructed object. Mention that singletons hamper testing and are often better replaced by dependency injection.
6 Design a URL shortener.
mediumGenerate a short key per long URL, store key to URL in a database, and redirect with HTTP 301 or 302. Key generation: base62 encoding of a unique id from a distributed counter or pre-allocated ranges per server, which avoids collisions; or a hash with collision checking. Reads dominate writes, so cache hot keys in memory. Add expiry and optional custom aliases, and analytics through an asynchronous queue so redirects stay fast. See system design interview questions.
7 Check whether a string of brackets is balanced.
easyPush opening brackets on a stack; for a closing bracket, the stack must be nonempty and its top must be the matching opener. At the end the stack must be empty. O(n) time and space. Mistake: ignoring a closing bracket on an empty stack.
pythondef balanced(s): pairs = {')': '(', ']': '[', '}': '{'} st = [] for ch in s: if ch in '([{': st.append(ch) elif ch in pairs: if not st or st.pop() != pairs[ch]: return False return not st8 Puzzle: you have 12 coins, one differs in weight (heavier or lighter). Find it in three weighings.
hardNumber the coins 1 to 12. Weigh 1-4 against 5-8. If balanced, the odd coin is among 9-12: weigh 9, 10, 11 against 1, 2, 3 (known good). If those balance, coin 12 is odd. Otherwise you know whether the odd coin is heavy or light, and weigh two of 9, 10, 11 against each other: the odd one shows, or the third coin is odd if they balance. If the first weighing is unbalanced, say 1-4 is heavier, then either one of 1-4 is heavy or one of 5-8 is light. Weigh 1, 2, 5 against 3, 6, 9 (coin 9 is good). If the left is heavier, weigh 1 against 2 (the heavier is odd; if equal, 6 is light). If balanced, weigh 7 against 8 (the lighter is odd; if equal, 4 is heavy). If the right is heavier, weigh 3 against 9: if 3 is heavier it is odd, else 5 is light.
9 What is the difference between process and thread, and between concurrency and parallelism?
easyA process owns an address space and resources; threads share them within a process. Concurrency means making progress on several tasks by interleaving, possible on one core. Parallelism means executing at the same instant on several cores. A web server can be concurrent on one core with an event loop, and parallel when worker threads run on many cores.
10 Design a parking lot reservation system for multiple cities.
mediumAdd a location hierarchy (city, lot, level, spot) and a Reservation entity with a time window. Availability is the set of spots with no overlapping reservation; prevent double booking with a transaction and a unique constraint or locking on the spot and time slot. Pricing is a strategy by vehicle type and duration. Mention that overlapping intervals are checked by comparing start less than other end and end greater than other start.
11 Tell me about a project where you wrote code you are proud of.
easyChoose a project where design choices were visible: how you structured modules, tests you wrote, and a bug you prevented. Discuss one decision you would make differently now. Directi-style interviews commonly probe depth, so be sure you can explain every part of it.
12 Why Directi?
easyBe honest and specific: you like small, engineering-driven teams, hard algorithmic problems and owning products end to end. Mention anything you have read about its products or engineering culture, and what you want to learn. Avoid generic remarks.
Frequently asked questions
Does Directi ask low-level design?
Object-oriented design questions such as games or booking systems are commonly reported. Practise class design with working code.
How strong should my algorithms be?
Reports describe medium to hard problems. See the Directi coding round questions.
Are puzzles asked?
They are sometimes reported. Practise explaining your reasoning aloud.
Where can I find openings?
On Directi's own careers site. This site has no sourced hiring data for the company.
Related guides
More in Company Interview Questions
- Dream11 Coding Round Questions with Solutions
- Dream11 Interview Questions and Answers
- DXC Technology coding round questions
- DXC Technology interview questions and answers
- EPAM Coding Round Questions
- EPAM Interview Questions with Answers
- EY coding round questions
- EY interview questions and answers
- Fidelity Investments coding round questions with solutions
- Fidelity Investments interview questions with answers (engineers)
- Flipkart Coding Round Questions with Solutions
- Flipkart Interview Questions and Answers