Q. What is the difference between a process and a thread?
asked 4xeasyOperating systemsTechnical2021-2024
Ans. A process is an independent running program with its own memory space, while a thread is a smaller unit of execution within a process that shares that process’s memory. Processes are more isolated and cost more to create or switch between. Threads are lighter, but shared memory makes synchronisation and race conditions important.
Q. What are the different types of software testing?
asked 3xeasySdlcTechnical2014-2024
Ans. Common types of software testing include unit, integration, system, acceptance, regression, performance, security, usability, smoke and exploratory testing. The most important distinction is between functional testing, which checks behaviour against requirements, and non-functional testing, which checks qualities such as speed, reliability, security and ease of use.
Q. Explain the diamond problem in inheritance and how it can be resolved.
asked 2xmediumOOPTechnical2023
Ans. The diamond problem occurs when a class inherits from two classes that both inherit from the same base class, creating ambiguity over which inherited member or base instance to use. It is commonly resolved with virtual inheritance in C++, or avoided in languages like Java by using interfaces and explicit method overriding.
Q. Design a new cryptographic algorithm.
asked 2xhardCryptographyHR2023
Ans. I would not design a new cryptographic algorithm unless there is a strong, reviewed need. I would define the threat model, use proven primitives such as AES-GCM, ChaCha20-Poly1305, HKDF and Ed25519, then combine them in a simple protocol with nonce discipline, key rotation, authentication and independent security review.
Q. Differentiate between a thread and a process.
asked 2xeasyOperating systemsTechnical2023-2025
Ans. A process is an independent running program with its own memory space, while a thread is a smaller unit of execution within a process that shares that process’s memory and resources. Processes are more isolated and expensive to create or switch between, while threads are lighter but need careful synchronisation to avoid shared data bugs.
Q. What are primary keys and foreign keys in SQL?
asked 2xeasySQLTechnical2023
Ans. A primary key uniquely identifies each row in a table, while a foreign key is a column that refers to a primary key in another table. Primary keys must be unique and not null. Foreign keys enforce relationships between tables and help maintain referential integrity, preventing invalid links between related data.
Q. Explain the four pillars of Object-Oriented Programming.
asked 2xeasyOOPTechnical2023
Ans. The four pillars of object-oriented programming are encapsulation, abstraction, inheritance, and polymorphism. Encapsulation hides internal state behind methods. Abstraction exposes only essential behaviour. Inheritance lets classes reuse and extend other classes. Polymorphism lets different objects be treated through the same interface while providing their own behaviour.
Q. What are the advantages and disadvantages of cloud computing?
asked 2xeasyCloudTechnical2024
Ans. Cloud computing offers scalability, lower upfront cost, fast provisioning and managed infrastructure, but it can introduce vendor lock-in, ongoing usage costs, latency, compliance concerns and dependence on internet access. The key trade-off is control versus convenience: providers handle much of the infrastructure, but you must manage security, data governance and cost carefully.
Q. Explain arrays and linked lists, and compare stacks and queues.
asked 2xeasyData structuresTechnical2023
Ans. Arrays store elements in contiguous memory, giving fast index access, while linked lists store nodes with pointers, making insertions and deletions easier when the position is known. Arrays have O(1) indexing but costly resizing or middle changes. Stacks are last in, first out. Queues are first in, first out.
Q. Explain the phases of the Software Development Life Cycle (SDLC).
asked 2xeasySoftware engineeringTechnical2015-2023
Ans. The SDLC phases are planning, requirements analysis, design, implementation, testing, deployment and maintenance. Planning defines scope and feasibility, requirements capture what users need, design describes the architecture, implementation builds it, testing verifies quality, deployment releases it, and maintenance fixes issues and improves the software over time.
Q. Write an SQL query to find the second highest salary from an employee table.
asked 2xeasySQLTechnical2021-2023
Ans. Select the distinct salaries, sort them in descending order, and return the second row using an offset. The key detail is using distinct, so duplicate top salaries do not hide the true second highest salary. This approach sorts the salary values, so its typical time complexity is O(n log n).
Q. Snake and Ladder Problem
asked 1xmediumGraphsTechnical2021
Ans. Use BFS to find the minimum dice throws, treating each board cell as a graph node and each dice roll as an edge. Keep a queue of cells with distance, mark visited cells, and when moving, jump immediately if the destination has a snake or ladder. Time complexity is O(N), with O(N) space.
Q. Special Keyboard problem
asked 1xmediumDynamic programmingTechnical2021
Ans. Use dynamic programming where dp[i] is the maximum number of As possible with i key presses. For each i, either press A, giving dp[i - 1] + 1, or choose a breakpoint j where you select, copy, then paste repeatedly. The transition is dp[i] = max(dp[i], dp[j] * (i - j - 1)). Time complexity is O(n²).
Q. Merge overlapping intervals
asked 1xmediumArraysTechnical2021
Ans. Sort the intervals by start time, then scan once, keeping a result list of merged intervals. For each interval, compare its start with the end of the last interval in the result. If they overlap, extend the end; otherwise, append it. Time complexity is O(n log n) due to sorting, with O(n) space.
Q. How does virtual memory work?
asked 1xmediumOperating systemsTechnical2020
Ans. Virtual memory gives each process its own large, continuous address space by mapping virtual addresses to physical memory addresses. The CPU’s memory management unit uses page tables to translate addresses page by page. If a page is not in RAM, a page fault occurs and the operating system loads it, possibly evicting another page.
Q. Explain mode switching in UNIX
asked 1xmediumOperating systemsTechnical2015
Ans. Mode switching in UNIX is the transition between user mode and kernel mode when a process needs an operating system service. A system call, interrupt, or exception traps into the kernel, where privileged instructions can run safely. The CPU switches privilege level, saves state, executes kernel code, then returns to user mode.
Q. How does a load balancer work?
asked 1xmediumScalabilitySystem design2025
Ans. A load balancer sits in front of multiple servers and distributes incoming traffic across them so no single server is overwhelmed. It uses rules such as round robin, least connections, or request content, and the key detail is health checking: unhealthy instances are removed from rotation until they recover.
Q. Implement a doubly linked list.
asked 1xmediumLinked listsTechnical2015
Ans. Implement it with a Node holding value, previous, and next references, and a list holding head, tail, and optionally size. Insert by relinking neighbouring pointers, delete by reconnecting previous and next, and update head or tail at boundaries. Search is O(n), while insert or delete with a known node is O(1).
Q. Graph Connectivity With Threshold
asked 1xmediumGraphsOnline test2021
Ans. Use a disjoint set union structure and connect numbers that share a common divisor greater than the threshold. For each divisor d from threshold + 1 to n, union d with all its multiples. Then each query is true if both nodes have the same root. Time is about O(n log n + q α(n)).
Q. Design a Hostel Management System.
asked 1xmediumHigh level designSystem design2020
Ans. Design a hostel management system with services for student profiles, room allocation, fee payments, maintenance requests, attendance or leave, visitors, and notifications. Use a relational database for rooms, beds, bookings, invoices, and complaints, with transactions to prevent double allocation. The most important detail is consistent room inventory and occupancy state.
Q. Explain how HTTPS works in detail.
asked 1xmediumNetworkingTechnical2014
Ans. HTTPS is HTTP sent over TLS, which encrypts traffic, authenticates the server and protects data integrity. The browser checks the server certificate against trusted certificate authorities, negotiates protocol settings, performs a key exchange to create shared session keys, then uses fast symmetric encryption and message authentication for all HTTP requests and responses.
Q. Explain single-user system in UNIX
asked 1xmediumOperating systemsTechnical2015
Ans. A single-user system in UNIX is a mode where only one user, usually the root user, can log in and use the system. It is mainly used for system maintenance, recovery, or fixing configuration problems. In this mode, networking and normal multi-user services are usually disabled or limited.
Q. Explain the working of IDS and IPS
asked 1xmediumSecurityTechnical2015
Ans. An IDS detects suspicious activity and raises alerts, while an IPS detects suspicious activity and actively blocks or mitigates it. An IDS usually monitors network traffic or host events out of band, using signatures or behaviour analysis. An IPS sits inline with traffic, so it can drop packets, reset connections, or apply rules immediately.
Q. What are alternatives to REST APIs?
asked 1xmediumWebTechnical2025
Ans. Alternatives to REST APIs include GraphQL, gRPC, SOAP, WebSockets, message queues, and RPC-style HTTP APIs. The main difference is communication style: GraphQL lets clients request exact data, gRPC is fast and strongly typed, WebSockets support real-time two-way communication, and message queues support asynchronous processing between services.
Q. Design an IoT communication protocol.
asked 1xmediumNetworkingSystem design2015
Ans. I would design a lightweight publish and subscribe protocol over TCP with TLS, using topics, device identities, acknowledgements, retained messages and offline queues. The most important detail is reliability under poor networks: use small binary frames, QoS levels, heartbeats, backoff reconnects, idempotent message IDs and server-side rate limits to protect constrained devices.
Q. Explain the core concepts of React.js.
asked 1xmediumFrontendManagerial2023
Ans. React.js is a JavaScript library for building user interfaces from reusable components. Its core concepts are components, props for passing data, state for managing changing data, and rendering a virtual DOM efficiently. The key idea is declarative UI: you describe what the screen should look like, and React updates it when data changes.
Q. Explain different normal forms in DBMS.
asked 1xmediumDBMSTechnical2021
Ans. Normal forms are rules for designing relational tables to reduce redundancy and avoid update, insert and delete anomalies. 1NF requires atomic values, 2NF removes partial dependency on a composite key, 3NF removes transitive dependency, and BCNF requires every determinant to be a candidate key. Higher forms handle multivalued and join dependencies.
Q. Explain common types of network attacks.
asked 1xmediumSecurityTechnical2015
Ans. Common network attacks include denial of service, man in the middle, packet sniffing, spoofing, replay attacks, and malware-based intrusion. The key difference is the goal: some disrupt availability, some steal or alter data, and others impersonate trusted systems. Defences include encryption, authentication, patching, firewalls, monitoring, and rate limiting.
Q. Explain how server load balancing works.
asked 1xmediumNetworkingTechnical2015
Ans. Server load balancing distributes incoming client requests across multiple backend servers so no single server becomes overloaded and the service stays available. A load balancer chooses a server using rules such as round robin, least connections, or weighted capacity, and it should also run health checks so traffic is not sent to failed servers.
Q. Find the largest sum contiguous subarray
asked 1xmediumArraysOnline test2015
Ans. Use Kadane’s algorithm: scan the array, keeping the best sum ending at the current index and the best sum seen overall. At each element, either extend the previous subarray or start a new one there. Initialise with the first element to handle all negative arrays. Time is O(n), space is O(1).
Q. Optimize addition of values in an array.
asked 1xmediumArraysTechnical2023
Ans. Use a difference array to optimise repeated range additions on an array. Instead of updating every element in a range, add the value at the start index and subtract it after the end index, then build the final array with a prefix sum. Each update is O(1), and reconstruction is O(n).
Q. Explain the complete working of a router.
asked 1xmediumNetworkingTechnical2015
Ans. A router forwards packets between different networks by reading the destination IP address, choosing the best next hop from its routing table, and sending the packet out through the correct interface. It builds routes using static configuration or routing protocols, updates frame headers for each link, decrements TTL, and drops invalid or expired packets.
Q. Explain the JavaScript execution sequence.
asked 1xmediumJavaScriptTechnical2025
Ans. JavaScript runs synchronous code first, line by line, on the call stack, creating execution contexts for global code and function calls. Asynchronous work is handled by the runtime, then queued for the event loop. The key detail is order: after the stack is empty, microtasks like promises run before macrotasks like timers.
Q. Explain the lifecycle of a React component
asked 1xmediumFrontendTechnical2021
Ans. A React component’s lifecycle is the sequence of mounting, updating, and unmounting. Mounting creates it and puts it in the DOM, updating re-renders it when props or state change, and unmounting removes it. In modern React, lifecycle behaviour is usually handled with useEffect, including cleanup for subscriptions, timers, or listeners.
Q. Explain the lifecycle and flow of Servlets.
asked 1xmediumWebTechnical2023
Ans. A Servlet is loaded by the container, instantiated, initialised once with init(), then handles each request through service(), which dispatches to methods like doGet() or doPost(), and is finally removed with destroy(). The key point is that one Servlet instance usually serves many concurrent requests, so shared state must be thread-safe.
Q. How can DoS attacks on servers be prevented?
asked 1xmediumSecurityTechnical2020
Ans. DoS attacks are prevented or reduced by filtering and limiting traffic before it reaches the application servers. Use a CDN or DDoS protection service, rate limiting, firewalls, load balancers, autoscaling, and request validation. The most important detail is to absorb and drop malicious traffic at the network edge, not inside the core service.
Q. Count the number of k-diff pairs in an array.
asked 1xmediumArraysOnline test2021
Ans. Use a hash map of frequencies and count unique value pairs whose absolute difference is k. If k is negative, return 0. If k is 0, count values appearing more than once. Otherwise, for each distinct value x, count it if x + k exists. This runs in O(n) time and O(n) space.
Q. Explain the operating system booting process.
asked 1xmediumOperating systemsManagerial2024
Ans. The operating system booting process starts when firmware runs hardware checks, finds a bootable device, and loads a bootloader. The bootloader loads the OS kernel into memory and passes control to it. The kernel initialises memory, devices, drivers, and system services, then starts the first user-space process and brings the system to a usable state.
Q. How do you handle transactions in a database?
asked 1xmediumDBMSTechnical2023
Ans. I handle transactions by starting a transaction, performing all related reads and writes, then committing if everything succeeds or rolling back on any error. The most important detail is preserving ACID properties, especially atomicity and isolation, so partial changes are not saved and concurrent operations do not corrupt the data.
Q. Design the software for a water bottle system.
asked 1xmediumObject oriented designTechnical2015
Ans. Model the bottle as an embedded state machine with sensor drivers for level, temperature, cap and motion, plus a small service that computes intake events and exposes them over Bluetooth to a mobile app. The key detail is reliable event detection: debounce noisy sensors and persist readings locally so usage is not lost when offline.
Q. Explain LAN networking and socket connections.
asked 1xmediumNetworkingTechnical2023
Ans. LAN networking connects devices within a local area, such as an office or home, so they can share data using Ethernet or Wi-Fi and protocols like IP. A socket connection is one endpoint of communication between programs, usually identified by IP address, port, and protocol, commonly TCP for reliable streams or UDP for datagrams.
Q. Find palindromic substrings in a given string.
asked 1xmediumStringsOnline test2019
Ans. Expand around every possible centre and collect each substring while the characters on both sides match. Use two centre types, one for odd length and one for even length palindromes. Store results in a list, or a set if duplicates should be removed. This takes O(n squared) time and up to O(n squared) space.
Q. Find whether two singly linked lists intersect
asked 1xmediumLinked listsOnline test2015
Ans. Use two pointers, one on each list, and move each one step at a time; when a pointer reaches the end, redirect it to the head of the other list. If the lists intersect, the pointers meet at the shared node. Compare node references, not values. This takes O(m + n) time and O(1) space.
Q. Explain how a web application works end to end.
asked 1xmediumNetworkingTechnical2014
Ans. A web application works by a browser sending an HTTP request to a server, which processes it, talks to databases or other services, and returns a response such as HTML, JSON, CSS or JavaScript. The browser then renders the page and runs client-side code. The most important detail is the request-response flow over HTTP.
Q. Explain the components of the Hadoop ecosystem.
asked 1xmediumBig dataTechnical2024
Ans. The Hadoop ecosystem is a set of tools for storing, processing and managing big data across clusters. HDFS provides distributed storage, YARN manages cluster resources, and MapReduce processes data in parallel. Hive and Pig support higher level querying, HBase provides NoSQL storage, and Sqoop, Flume, Oozie and ZooKeeper handle ingestion, workflow and coordination.
Q. Explain the SOLID principles of software design.
asked 1xmediumOOPTechnical2021
Ans. SOLID is a set of five object-oriented design principles: single responsibility, open closed, Liskov substitution, interface segregation, and dependency inversion. They mean classes should have one reason to change, be extendable without modification, support safe subtype use, expose focused interfaces, and depend on abstractions rather than concrete implementations.
Q. How do you achieve asynchronicity in JavaScript?
asked 1xmediumJavaScriptTechnical2025
Ans. Asynchronicity in JavaScript is achieved with callbacks, Promises, and async/await, backed by the event loop. JavaScript runs on a single main thread, so long-running work is delegated to browser or Node APIs, and completion handlers are queued to run later without blocking the call stack.
Q. Solve problems based on linked lists and arrays.
asked 1xmediumArraysTechnical2015
Ans. Use pointers for linked lists and index based traversal for arrays, choosing the method that minimises extra space. For linked lists, common patterns are fast and slow pointers, reversal, merging and cycle detection. For arrays, use two pointers, sliding window, prefix sums, sorting or hashing. Aim for linear time where possible.
Q. Answer conceptual questions on DBMS fundamentals.
asked 1xmediumDBMSTechnical2023
Ans. DBMS fundamentals cover how data is stored, queried, protected and kept consistent. Key ideas include relational tables, keys, indexes, transactions, ACID properties, normalisation, joins and concurrency control. In interviews, answer each concept by defining it clearly, explaining why it matters, and giving one practical example or trade-off.
Q. Explain the basics of Artificial Neural Networks.
asked 1xmediumMlTechnical2015
Ans. Artificial Neural Networks are computing models made of connected layers of simple units, called neurons, that learn patterns from data. Each connection has a weight, neurons apply activation functions, and training adjusts weights to reduce prediction error, usually using backpropagation and gradient-based optimisation.
Q. What are virtual functions and why are they used?
asked 1xmediumOOPTechnical2021
Ans. Virtual functions are member functions that can be overridden in derived classes and are called based on the object’s actual runtime type, not the pointer or reference type. They are used to implement runtime polymorphism, letting common base-class interfaces call derived-class behaviour correctly, such as through base pointers or references.
Q. Add two numbers without using arithmetic operators
asked 1xmediumBit manipulationTechnical2021
Ans. Add the two numbers using bitwise operations: XOR gives the sum without carries, and AND followed by a left shift gives the carry. Repeat this process until the carry becomes zero. The key detail is that carries must be propagated iteratively. This uses constant space and runs in O(number of bits).
Q. How many times do the hour and minute hands overlap in 24 hours?
asked 1xmediumLogical reasoningTechnical2015
Ans. The hands overlap 22 times in 24 hours. The minute hand gains on the hour hand at 5.5 degrees per minute, so it catches up every 360 ÷ 5.5 = 65 5/11 minutes. That gives 11 overlaps in 12 hours, so over 24 hours there are 22 overlaps.
Q. Describe a challenging situation in a team and how you handled it
asked 1xmediumTeamworkManagerial2025
Ans. Choose a real team conflict or delivery problem where your actions made a difference. Emphasise how you listened, clarified responsibilities, kept communication calm, and helped the group reach a practical outcome. Interviewers listen for ownership, emotional control, collaboration, learning, and evidence that you improved the situation rather than blamed others.
Q. How can you make 3 equilateral triangles using 6 matchsticks without breaking them?
asked 1xmediumLogical reasoningTechnical2024
Ans. Use the third dimension. Join three matchsticks into a triangle on the table. From each corner, raise one matchstick so their free ends meet above the centre, forming a triangular pyramid. The six sticks are the six edges of a regular tetrahedron. It has equilateral triangular faces, so any three are the required triangles.
Q. A man goes to a bar, the bartender shows him a gun, and the man leaves. Explain the scenario.
asked 1xmediumLateral thinkingTechnical2015
Ans. The man had hiccups and went to the bar for a glass of water. The bartender realised the problem and chose to scare him instead, by showing him a gun. The shock cured the hiccups, so the man no longer needed the water and left.
Q. Given a plane and n straight lines, what is the maximum number of regions that can be formed?
asked 1xmediumLogical reasoningOnline test2014
Ans. The maximum number of regions is n(n + 1)/2 + 1. For the maximum, no two lines should be parallel and no three should meet at one point. Add lines one at a time: the kth line is cut by the previous k − 1 lines into k parts, so it adds k new regions.
Q. If you are leading a group, how would you coordinate with team members and distribute work effectively?
asked 1xmediumLeadershipHR2021
Ans. Choose a situation where goals, deadlines and roles were unclear, then show how you created structure. Emphasise assessing strengths, agreeing priorities, assigning ownership, setting check-ins and removing blockers. Interviewers listen for fairness, communication, accountability and adaptability, not just task allocation. Include how you tracked progress and handled underperformance or changes.
Q. If a deadline is tomorrow but the priority is maintaining existing code, how would you handle the situation?
asked 1xmediumDecision makingManagerial2024
Ans. Choose an example where you protected a live system while still moving work forward. Emphasise clarifying the real priority, assessing risk, communicating trade-offs early, and agreeing a realistic scope for tomorrow. Interviewers listen for judgement, ownership, respect for maintainability, and evidence that you do not rush changes that could create bigger problems.
Q. What is the probability that a person is color blind or not?
asked 1xeasyProbabilityTechnical2020
Ans. The probability is 1, or 100%. For any event A, “A or not A” covers all possible outcomes and the two cases cannot happen together. So use the complement rule: P(A or not A) = P(A) + P(not A) = p + (1 - p) = 1.
Showing 60 of 423 questions. Ranked by how often the same question came back across interviews.