Hashedin interview questions

472 questions from 56 interviews · updated from reports 2017-2025

Practise Hashedin-style

About

HashedIn by Deloitte is a software engineering and digital product development company that builds cloud, data, and platform solutions for businesses. In India, it commonly hires Software Engineers, Software Engineer Interns converting to full-time roles, and SDE Interns converting to full-time roles.

The roles that come up most are Software Engineer, Software Engineer Intern + FTE and SDE Intern + FTE. This covers 56 candidate interviews reported from 2017 to 2025. Most sat it at entry level (33 of 56 that recorded a level), with 18 internship interviews alongside. Among the 50 that recorded either route, arrivals split between campus drives (24, 48%) and off-campus applications (26, 52%). Most questions fall under DSA and CS fundamentals.

Category
Difficulty
Round

Interview questions

Q. Explain ACID properties in databases.

asked 3xeasyDBMSSystem design, Technical2020-2021

Ans. ACID properties are guarantees that make database transactions reliable: Atomicity, Consistency, Isolation, and Durability. Atomicity means all changes commit or none do. Consistency keeps data valid under rules and constraints. Isolation makes concurrent transactions behave safely. Durability means committed changes survive crashes, usually through logging and persistent storage.

Q. Find the length of the longest consecutive 1s in the binary representation of a number.

asked 3xeasyBit manipulationOnline test, Technical2020-2021

Ans. Scan the bits of the number and keep a current run length and a maximum run length. For each bit, increment the current count if it is 1, otherwise reset it to zero. The answer is the maximum seen. This uses constant space and runs in logarithmic time in the number’s value.

Q. Explain Garbage Collection in Java.

asked 2xmediumOOPTechnical2021

Ans. Garbage collection in Java is automatic memory management that finds objects no longer reachable by the program and reclaims their heap memory. The key point is reachability from roots such as stack variables, static fields and active threads. It reduces manual memory errors, but collection timing is not deterministic and may briefly pause execution.

Q. Find the maximum sum contiguous subarray

asked 2xmediumArraysTechnical2021-2024

Ans. Use Kadane’s algorithm: scan the array once, keeping the best subarray sum ending at the current position and the best sum seen overall. At each element, either extend the previous subarray or start a new one there. Initialise from the first element to handle all-negative arrays. Time is O(n), space is O(1).

Q. Difference between a Web Server and a Socket Server

asked 2xmediumNetworkingTechnical2025

Ans. A web server handles HTTP requests and returns HTTP responses, usually serving web pages, APIs, or static files. A socket server is lower level and communicates over raw TCP or UDP sockets using any custom protocol. The key difference is that HTTP structure is built in for web servers, while socket servers define their own message format and behaviour.

Q. Design the class hierarchy for an online food delivery application.

asked 2xmediumOop designSystem design2021

Ans. Use core domain classes: User with Customer, Driver and Admin subclasses; Restaurant owning Menu and MenuItem; Cart holding CartItem; Order containing OrderItem, Delivery and Payment; Address, Location, Rating and Notification as shared value or service classes. Keep Order as the central aggregate, with clear status transitions for ordering, payment, preparation and delivery.

Q. Find the length of the longest substring without repeating characters.

asked 2xmediumStringsTechnical2020-2021

Ans. Use a sliding window and a hash map of each character’s most recent index to find the longest substring without repeats. Move the right pointer through the string; if a character was seen inside the current window, move the left pointer just after its previous index. Track the maximum window length. Time is O(n), space is O(k).

Q. Design a database schema for IRCTC including tables, attributes, relationships, and optimize it

asked 2xmediumDatabase designTechnical2024

Ans. Use tables for users, stations, trains, train_stops, schedules, coaches, seats, trips, bookings, passengers, payments and cancellations. Key relationships are train_stops linking trains to stations, trips representing a train on a date, and bookings holding passengers and allocated seats. Optimise with indexes on trip_date, train_id, source, destination, PNR and seat status, plus transactional locking for seat allocation.

Q. Detect a loop in a linked list

asked 2xeasyLinked listsTechnical2021

Ans. Use Floyd’s cycle detection with two pointers, slow and fast, starting at the head. Move slow one node at a time and fast two nodes at a time. If they ever meet, there is a loop. If fast reaches null, there is no loop. This runs in O(n) time and O(1) space.

Q. Explain ACID properties in DBMS.

asked 2xeasyDBMSTechnical2021-2022

Ans. ACID properties are the guarantees that make database transactions reliable: Atomicity, Consistency, Isolation and Durability. Atomicity means all or nothing, Consistency keeps valid rules, Isolation prevents concurrent transactions interfering, and Durability ensures committed changes survive crashes. They are essential for correctness in systems handling critical data.

Q. Find the missing number in an array.

asked 2xeasyArraysTechnical2021

Ans. Use the expected sum of the full range and subtract the actual array sum; the difference is the missing number. For numbers 1 to n, expected sum is n times n plus 1 divided by 2. This uses no extra data structure, runs in O(n) time, and O(1) space.

Q. Implement a stack using a linked list

asked 2xeasyLinked listsTechnical2024

Ans. Use a singly linked list and treat the head node as the top of the stack. To push, create a new node and link it before the current head. To pop, remove the head and return its value. Peek reads the head value. Push, pop and peek are O(1); space is O(n).

Q. Explain setter and getter functions in C++

asked 2xeasyOOPTechnical2025

Ans. Getter and setter functions are member functions used to read and update private data members of a C++ class. A getter returns a value, often without modifying the object, while a setter assigns a new value. They support encapsulation by controlling access, validation, and invariants instead of exposing fields directly.

Q. Find the Nth node from the end of a linked list

asked 2xeasyLinked listsTechnical2021

Ans. Use two pointers: move the first pointer N nodes ahead, then move both pointers one node at a time until the first reaches the end. The second pointer is then at the Nth node from the end. Handle the case where the list has fewer than N nodes. This takes O(n) time and O(1) space.

Q. Merge two sorted arrays while maintaining order

asked 2xeasyArraysTechnical2025

Ans. Use two pointers, one for each sorted array, and build a result array by repeatedly taking the smaller current element. When one array is exhausted, append the remaining elements from the other array. This preserves sorted order, runs in O(n + m) time, and uses O(n + m) extra space.

Q. What is abstraction? Provide a real-life example

asked 2xeasyOOPTechnical2025

Ans. Abstraction is the idea of hiding complex details and showing only the essential features needed to use something. In software, it lets users work with simple interfaces without knowing internal implementation. A real-life example is driving a car: you use the steering wheel, pedals and gears without understanding the engine mechanics.

Q. Check whether two strings are anagrams of each other.

asked 2xeasyStringsTechnical2021

Ans. Use character frequency counts to check whether two strings are anagrams. If their lengths differ, return false. Otherwise count each character in the first string, subtract counts using the second string, and ensure no count becomes negative or remains non-zero. A hash map or fixed-size array works. Time complexity is O(n).

Q. Write an async/await function for API calls in React.js

asked 2xeasyReactTechnical2025

Ans. Create an async function inside useEffect, set loading true, call the API with fetch or axios using await, store the response in state, catch errors, and clear loading in finally. Use state variables for data, error, and loading. Abort or ignore stale requests on unmount. Local work is O(n) if rendering n returned items.

Q. How do you implement multiple pages in a React.js website?

asked 2xeasyReactTechnical2025

Ans. Implement multiple pages in a React website by using a routing library such as React Router to map URL paths to page components. Wrap the app in a router, define routes for each path, and navigate with Link or NavLink so the page changes without a full browser reload.

Q. Implement a queue using an array with enqueue and dequeue operations

asked 2xeasyQueueTechnical2025

Ans. Use an array with two indices, front and rear, to represent the queue. Enqueue inserts at rear and moves rear forward. Dequeue removes from front and moves front forward. The key detail is to use the array circularly to avoid wasted space. Both operations take O(1) time.

Q. How can you render multiple images inside a component without repeating the <img> tag?

asked 2xeasyReactTechnical2025

Ans. Render them by storing the image data in an array and mapping over it to create one image element per item. Each item should include the source, alt text, and ideally a stable id for the key. This avoids repeated markup, keeps the component data-driven, and runs in linear time.

Q. Discuss DBMS concepts and write SQL queries

asked 2xunknownDBMSTechnical2024

Ans. A DBMS manages structured data using tables, keys, constraints, transactions and query processing. Core concepts are primary and foreign keys, normalisation, ACID properties, indexes, joins and isolation levels. SQL queries commonly use SELECT with WHERE, JOIN, GROUP BY, HAVING and ORDER BY. Indexes improve reads, while transactions protect consistency during updates.

Q. Rotate a 2D matrix.

asked 1xmediumArraysTechnical2021

Ans. Rotate a square 2D matrix 90 degrees clockwise by transposing it, then reversing each row. Transpose swaps matrix[i][j] with matrix[j][i] for the upper triangle, then row reversal puts columns into their rotated positions. This uses the matrix itself, takes O(n²) time, and O(1) extra space.

Q. Triplets with sum Zero

asked 1xmediumArraysTechnical2021

Ans. Sort the array, then fix each element and use two pointers on the remaining part to find pairs whose sum is the negative of the fixed element. Move pointers based on the current sum and skip duplicates to avoid repeated triplets. This uses no extra main data structure and runs in O(n²) time.

Q. Sort the Matrix Diagonally

asked 1xmediumSortingTechnical2021

Ans. Sort each top-left to bottom-right diagonal independently in ascending order. Group cells by the key row minus column, collect each diagonal’s values in a list, sort the list, then write values back along the same diagonal. If the matrix has m rows and n columns, the time complexity is O(mn log min(m,n)).

Q. Design a database for a Bank

asked 1xmediumDBMSTechnical2021

Ans. Use a relational database with core tables for customers, accounts, transactions, ledger_entries, cards, branches and audit_logs. The most important detail is double-entry accounting: every movement creates balanced debit and credit ledger rows in one ACID transaction. Store balances as derived or carefully cached values, with idempotency keys, strong constraints and audit trails.

Q. Evaluate an infix expression

asked 1xmediumStacksOnline test2021

Ans. Use two stacks: one for operands and one for operators. Scan left to right, push numbers, handle opening brackets, and before pushing an operator, apply any stacked operator with higher or equal precedence. On closing brackets, apply until the matching opening bracket. This evaluates the expression in O(n) time and O(n) space.

Q. Explain the Banker's Algorithm.

asked 1xmediumOperating systemsTechnical2021

Ans. The Banker’s Algorithm is a deadlock avoidance method that grants a resource request only if the system remains in a safe state afterwards. It tracks available resources, current allocations, and each process’s maximum need. If some ordering lets all processes finish, the request is safe; otherwise it is delayed.

Q. Implement the Stock Span problem

asked 1xmediumStacksTechnical2024

Ans. Use a monotonic decreasing stack to store previous prices with their accumulated spans. For each price, start span as 1, pop while the stack top price is less than or equal to current price, adding its span. Push the current price and total span, then output it. Each price is pushed and popped once, so time is O(n).

Q. Connect n ropes with minimum cost

asked 1xmediumGreedyOnline test2025

Ans. Use a min heap to always connect the two shortest ropes first, add their sum to the total cost, then push the combined rope back into the heap. Repeat until one rope remains. This greedy choice minimises repeated large costs. Time complexity is O(n log n), with O(n) extra space.

Q. What are Pure Components in React?

asked 1xmediumFrontendTechnical2021

Ans. Pure Components in React are components that render the same output for the same props and state. In class components, React.PureComponent automatically performs a shallow comparison of props and state to skip unnecessary re-renders. The key detail is that it only works safely when data is treated immutably.

Q. Explain context managers in Python.

asked 1xmediumOOPTechnical2021

Ans. Context managers in Python are objects that set up and tear down resources around a block of code, usually used with the with statement. They implement __enter__ and __exit__, or are created with contextlib. The key benefit is reliable cleanup, such as closing files or releasing locks, even if an exception occurs.

Q. Explain deep copy and shallow copy.

asked 1xmediumOOPTechnical2020

Ans. A shallow copy creates a new outer object but keeps references to the same nested objects, while a deep copy creates a new object and recursively copies the nested objects too. The key difference is aliasing: changes to shared nested data affect both shallow copies, but not properly made deep copies.

Q. Implement a stack using two queues.

asked 1xmediumStack queueTechnical2021

Ans. Use two queues by making push costly: enqueue the new element into the empty helper queue, move all elements from the main queue into it, then swap the queue names. The front of the main queue is always the stack top. Push is O(n), while pop, top, and empty are O(1).

Q. Merge two unsorted lists efficiently.

asked 1xmediumSortingTechnical2021

Ans. Merge them by appending all elements of one list to the other, since no ordering has to be preserved. For arrays, create a result and copy both lists, taking O(n + m) time and space. For linked lists with a tail pointer, link the tail of the first to the head of the second.

Q. Design and write a REST API controller.

asked 1xmediumWebSystem design2021

Ans. Design the controller around resources, HTTP verbs, status codes, validation and clear error responses. For example, a Users controller exposes create, read, update and delete endpoints, delegates business logic to a service, and never stores logic in the controller. Use a repository or map-backed store. Lookup, update and delete are typically constant time by id.

Q. Explain HTTP, routers, and IP addresses.

asked 1xmediumNetworkingTechnical2021

Ans. HTTP is the protocol browsers and servers use to request and send web content, IP addresses identify devices on a network, and routers move packets between networks. The key detail is that HTTP works at the application level, while IP addressing and routing handle delivery of the data underneath.

Q. Find the shortest path in a given graph.

asked 1xmediumGraphsOnline test2017

Ans. Use BFS for an unweighted graph, and Dijkstra’s algorithm for a weighted graph with non-negative edge weights. BFS uses a queue and runs in O(V + E). Dijkstra uses a min-priority queue with distances and runs in O((V + E) log V). Bellman-Ford is needed for negative weights.

Q. Write code for implementing React Router

asked 1xmediumReactTechnical2025

Ans. Implement a minimal React Router by keeping a route table from path patterns to components, storing the current location in state, and rendering the component whose pattern matches window.location.pathname. Use the History API for navigation, intercept link clicks with pushState, and listen to popstate. Lookup is O(n), or O(1) with exact-path maps.

Q. Find the k-th largest element in an array

asked 1xmediumHeapsTechnical2024

Ans. Use a min-heap of size k: insert each element, and whenever the heap grows beyond k, remove the smallest. After processing the array, the heap root is the k-th largest element. This takes O(n log k) time and O(k) space, and handles duplicates naturally.

Q. Design a music player system like Spotify.

asked 1xmediumScalable systemsSystem design2021

Ans. Design it as clients talking to API gateways, with separate services for users, catalogue, search, playlists, recommendations, payments and streaming. Store metadata in relational or document stores, audio in object storage, and deliver tracks through a CDN. The most important detail is low-latency playback using adaptive bitrate streaming, caching and pre-signed URLs.

Q. Explain Boyce-Codd Normal Form (BCNF) rules

asked 1xmediumDBMSTechnical2021

Ans. BCNF requires that, for every non-trivial functional dependency X determines Y in a relation, X must be a superkey. This means every determinant must uniquely identify the whole row. It is stricter than Third Normal Form and removes redundancy caused by dependencies on attributes that are not candidate keys.

Q. Explain virtual memory in Operating Systems.

asked 1xmediumOperating systemsTechnical2021

Ans. Virtual memory is an operating system technique that gives each process its own logical address space, mapped to physical RAM by the memory management unit. The key detail is paging: memory is split into pages, and pages not currently in RAM can be stored on disk, enabling isolation, protection, and efficient memory use.

Q. What types of servers are available in Java?

asked 1xmediumJavaTechnical2021

Ans. Java supports mainly TCP servers and UDP servers through its networking APIs. A TCP server uses ServerSocket and Socket for reliable, connection-based communication, while a UDP server uses DatagramSocket for faster, connectionless messaging. In enterprise Java, these are often wrapped by web servers or application servers such as Tomcat or WildFly.

Q. Write code for K rotations on a sorted array

asked 1xmediumArraysTechnical2025

Ans. Rotate the sorted array by k using the reversal approach on the same array. First reduce k with k % n, then reverse the whole array, reverse the first k elements, and reverse the remaining n minus k elements. This uses the array in place, runs in O(n) time, and uses O(1) extra space.

Q. Explain CPU scheduling algorithms and paging.

asked 1xmediumOperating systemsTechnical2021

Ans. CPU scheduling algorithms choose which ready process runs next, while paging is a memory management scheme that maps fixed-size virtual pages to physical frames. Common scheduling policies include FCFS, SJF, priority, round robin and multilevel queues, balancing throughput, waiting time and fairness. Paging removes external fragmentation but needs page tables and may cause page faults.

Q. Explain the approach to solve a graph problem.

asked 1xmediumGraphsTechnical2021

Ans. Model the problem as vertices and edges, choose an adjacency list, then apply the graph algorithm that matches the goal. Use BFS for shortest path in an unweighted graph, DFS for reachability or components, topological sort for dependencies, and Dijkstra for weighted shortest paths. Track visited nodes to avoid cycles and repeated work.

Q. Add 1 to a number represented as a linked list.

asked 1xmediumLinked listsTechnical2021

Ans. Reverse the linked list, add 1 with carry from the least significant digit, then reverse it back. Traverse nodes, updating each digit and propagating carry while it is 1. If carry remains after the last node, append a new node with digit 1. This uses the list itself, runs in O(n) time and O(1) extra space.

Q. Write code to demonstrate runtime polymorphism.

asked 1xmediumOOPTechnical2021

Ans. Use a base class with a virtual method, override it in derived classes, and call it through a base-class reference. For example, keep Dog and Cat objects in a list of Animal references and call speak() on each. The actual method is chosen at runtime. Traversal is O(n), with constant-time dispatch per call.

Q. Explain linear regression and its implementation

asked 1xmediumMachine learningTechnical2021

Ans. Linear regression models a continuous output as a weighted sum of input features, usually fitted by minimising mean squared error. Implement it with arrays or matrices for features and targets, compute weights using the normal equation or gradient descent. Normal equation is roughly cubic in feature count, while gradient descent is linear per iteration in data size.

Q. Perform spiral order traversal of a binary tree.

asked 1xmediumTreesTechnical2019

Ans. Use level order traversal with a queue, but alternate the direction of output at each level. Process one level at a time, collect its nodes in a temporary list, reverse or insert based on the current direction, then toggle the direction. This takes O(n) time and O(w) space, where w is tree width.

Q. Design a Food Delivery Application (like Swiggy).

asked 1xmediumScalable systemsSystem design2021

Ans. Design it with mobile clients, API gateway, user, restaurant, menu, cart, order, payment, delivery, notification and search services, backed by relational storage for orders and NoSQL/cache for menus and availability. The most important detail is order state consistency: use events and idempotent workflows so payment, restaurant acceptance and rider assignment cannot diverge.

Q. Design classes and methods for a Tic Tac Toe game

asked 1xmediumOOPTechnical2021

Ans. Use Game, Board, Player and Move classes. Game controls turns, validates moves, switches players and exposes playMove(row, col). Board stores a 3 by 3 grid and provides isEmpty, placeMark, isFull and getWinner. Player holds name and mark. Each move is constant time, and winner checking is constant for fixed size.

Q. Situational questions based on Sprint planning and Agile methodologies.

asked 1xmediumTeamworkManagerial2021

Ans. Choose a real sprint planning situation with unclear priorities, overcommitment, dependency risk, or changing scope. Emphasise how you used backlog refinement, capacity, estimation, acceptance criteria, and team input to reach a realistic sprint goal. Interviewers listen for collaboration, transparency, trade-off thinking, Agile discipline, and how you handled conflict without blaming others.

Q. If your close friend deleted important company data and your manager asks who did it, how would you respond?

asked 1xmediumEthicsHR2021

Ans. A strong answer should emphasise integrity over personal loyalty. Say you would be factual, not accusatory, and would not hide who deleted the data if you knew. Include that you would support recovery, encourage your friend to be honest, and follow company process. Interviewers listen for accountability, trustworthiness, and professionalism under pressure.

Q. A man has a lion, a goat, and grass on one side of a river and must transport them safely across using a boat

asked 1xmediumLogical reasoningTechnical2025

Ans. Take the goat across first, then return alone. Take the lion across, bring the goat back. Take the grass across, return alone. Finally take the goat across again. This works because the goat is never left alone with the lion or the grass without the man present.

Q. A man has a lion, a goat, and grass on one side of a river and needs to transport all safely across. How can he do it?

asked 1xmediumLogical reasoningTechnical2025

Ans. Take the goat across first, because the lion would eat it and the goat would eat the grass if left wrongly. Return alone, take the lion across, bring the goat back, take the grass across, return alone, then take the goat across again. Now all are across, and nothing is ever left with its predator.

Q. There are 8 balls, one of which is defective and the other 7 have equal weight. Find the defective ball in minimum number of attempts.

asked 1xmediumLogical reasoningSystem design2020

Ans. If defective means different weight and you do not know whether it is heavier or lighter, the minimum is 3 weighings. Weigh 1,2,3 against 4,5,6. If balanced, compare 7 with a good ball. If not, weigh 1,4 against 2,5, then use one final comparison to resolve the remaining pair.

Q. Given integers A, B, C, and K, remove numbers from the number line starting from 1 that are multiples of A, B, or C. Return the Kth number that gets removed.

asked 1xmediumLogical reasoningOnline test2020

Ans. Use binary search on the answer. For any value x, count removed numbers up to x using inclusion and exclusion: x/A + x/B + x/C minus pairwise LCM counts plus the LCM of all three. If the count is at least K, search left, otherwise right. The final lower bound is the Kth removed number.

Q. Describe a time when you faced a serious problem and how you dealt with it

asked 1xeasyConflict resolutionHR2021

Ans. Choose a real work problem with meaningful risk, such as a missed deadline, system failure, unhappy client, or team conflict. Emphasise your role, how you stayed calm, found the cause, involved the right people, and took action. Interviewers listen for ownership, judgement, communication, resilience, measurable results, and what you learned.

Showing 60 of 472 questions. Ranked by how often the same question came back across interviews.

Practise a Hashedin-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does Hashedin ask?

Candidate interviews most often cover DSA (46%) and CS fundamentals (44%).

How many rounds does Hashedin interview have?

Candidate interviews show an average of 3.7 rounds per experience, with a typical sequence of Online test → Technical → Technical → HR. Individual interview paths can vary.

Is the Hashedin interview hard?

Among questions with a recorded difficulty, the mix is easy 43%, medium 49%, hard 7%.