Q. Identify grammatical errors in given sentences.
asked 3xeasyVerbalOnline test2019-2023
Ans. Read the sentence slowly and check one issue at a time: subject verb agreement, tense, articles, prepositions, pronouns, modifiers, parallel structure, and word order. Look for unnecessary words and common idiom errors. If no error is visible, ensure the sentence is grammatically complete and conveys a clear meaning.
Q. Choose the correct spelling from the given options.
asked 3xeasyVerbalOnline test2019-2023
Ans. Identify the familiar root word first, then check common trouble points such as double letters, silent letters, vowel order, and suffix changes. Say each option slowly, but do not rely only on sound. Eliminate spellings that break standard patterns. If unsure, choose the version you have seen in formal writing.
Q. Given a string, find the longest palindromic substring
asked 2xmediumStringsOnline test2021-2022
Ans. Use expand around centres: for each index, expand once for an odd-length palindrome and once between indices for an even-length palindrome, tracking the best start and length. The key detail is handling both centre types. This uses only a few variables, runs in O(n squared) time, and uses O(1) extra space.
Q. Find the number of unique paths in a grid with obstacles.
asked 2xmediumDynamic programmingOnline test2021
Ans. Use dynamic programming where each cell stores the number of ways to reach it, treating obstacle cells as zero paths. Initialise the start as 1 if it is not blocked, then for each open cell add paths from the top and left. A one-dimensional array over columns is enough. Time is O(mn), space is O(n).
Q. Given a string s and an array of words, check whether s can be formed by concatenating words from the array
asked 2xmediumDynamic programmingOnline test2021-2023
Ans. Use dynamic programming with a hash set of the words. Let dp[i] mean the prefix s[0..i) can be formed. Set dp[0] true, then for each i check earlier j values where dp[j] is true and s[j..i) is in the set. The time complexity is O(n²) substring checks, with O(n) space.
Q. Write the binary search algorithm.
asked 2xeasyBinary searchTechnical2023
Ans. Binary search repeatedly halves a sorted array or list to find a target value. Keep two indexes, low and high, check the middle element, and move to the left half if the target is smaller or the right half if it is larger. It runs in O(log n) time and O(1) space iteratively.
Q. Explain virtualization and its real-life applications
asked 2xeasyOperating systemsTechnical2021-2023
Ans. Virtualization is the creation of a software-based version of a physical resource, such as a server, operating system, storage device, or network. The key idea is abstraction: one physical machine can run multiple isolated virtual machines. It is used in cloud computing, server consolidation, testing environments, disaster recovery, and running legacy applications.
Q. Identify correct synonyms and antonyms for given words.
asked 2xeasyVerbalOnline test2021-2023
Ans. Read the word carefully and decide its exact meaning in the sentence, if context is given. For synonyms, choose the option closest in meaning, not just vaguely related. For antonyms, choose the clearest opposite. Eliminate options with wrong tone, part of speech, or intensity. Check common prefixes and roots when unsure.
Q. Explain the four pillars of Object-Oriented Programming.
asked 2xeasyOOPHR, Technical2021-2023
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. Discuss popular cloud platforms and frameworks such as AWS and Azure
asked 2xeasyCloud computingTechnical2023-2024
Ans. AWS, Azure and Google Cloud are the main public cloud platforms, offering compute, storage, databases, networking, security and managed services. AWS is broad and mature, Azure integrates strongly with Microsoft ecosystems, and Google Cloud is strong in data and Kubernetes. Common frameworks include serverless, containers and infrastructure as code.
Q. The Stock Span Problem
asked 1xmediumStacksOnline test2024
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. What is a v-table in C++?
asked 1xmediumOOPTechnical2025
Ans. A v-table, or virtual table, is a compiler-generated table used to implement dynamic dispatch for virtual functions in C++. Each polymorphic class typically has one table of function pointers, and each object stores a hidden pointer to it. At runtime, calls to virtual functions are resolved through this table.
Q. Explain how a Max Heap works.
asked 1xmediumHeapTechnical2023
Ans. A Max Heap is a complete binary tree where every parent node is greater than or equal to its children, so the maximum value is always at the root. It is usually stored in an array. Insertion and deletion restore order by bubbling values up or down, taking O(log n) time.
Q. How does React work internally?
asked 1xmediumWebTechnical2021
Ans. React works by turning components into a tree of elements, comparing new output with the previous tree, and applying only necessary changes to the real DOM. The key detail is Fiber, React’s internal tree and scheduler, which breaks rendering into units of work so updates can be prioritised, paused, resumed, and committed efficiently.
Q. Explain STL concepts used in C++.
asked 1xmediumOOPTechnical2023
Ans. STL in C++ is built around containers, iterators and algorithms. Containers such as vector, list, map and set store data. Iterators provide a common way to traverse them. Algorithms such as sort, find and count work through iterators, so the same algorithm can operate on many container types.
Q. Solve House Robber.
asked 1xmediumDynamic programmingTechnical2025
Ans. Use dynamic programming: at each house, choose the maximum of robbing it plus the best up to two houses before, or skipping it and keeping the best up to the previous house. Store only two variables, prev2 and prev1, since older values are unnecessary. Time complexity is O(n), space complexity is O(1).
Q. Explain paging and virtual memory.
asked 1xmediumOperating systemsTechnical2024
Ans. Virtual memory is an abstraction that gives each process its own large, private address space, independent of physical RAM. Paging implements this by splitting virtual memory and physical memory into fixed-size pages and frames. A page table maps virtual pages to frames, and missing pages can be loaded from disk on demand.
Q. Maximum Sum Increasing Subsequence
asked 1xmediumDynamic programmingTechnical2024
Ans. Use dynamic programming where dp[i] is the maximum sum of an increasing subsequence ending at index i. Initialise dp[i] to arr[i], then for each j before i, if arr[j] < arr[i], update dp[i] with dp[j] + arr[i]. The answer is the maximum value in dp. Time complexity is O(n²), space is O(n).
Q. How does recursion work internally?
asked 1xmediumOperating systemsTechnical2023
Ans. Recursion works by a function calling itself, with each call getting its own stack frame containing parameters, local variables and return address. Calls keep stacking until a base case stops further calls. Then the stack unwinds, each call returns to its caller, and results are combined if needed. Excessive depth can cause stack overflow.
Q. How is memory allocated at runtime?
asked 1xmediumOperating systemsTechnical2023
Ans. At runtime, memory is mainly allocated on the stack for function calls and local values, and on the heap for objects whose lifetime is not tied to one function. Stack allocation is automatic and fast. Heap allocation is managed by an allocator, and memory is freed manually or by garbage collection, depending on the language.
Q. What is the 'virtual' keyword in C++?
asked 1xmediumOOPTechnical2025
Ans. The virtual keyword in C++ marks a member function for runtime polymorphism, so the version called is chosen based on the actual object type, not the pointer or reference type. It is used in base classes for functions meant to be overridden. Base classes should usually have a virtual destructor if deleted polymorphically.
Q. Detect a cycle (loop) in a linked list.
asked 1xmediumLinked listsTechnical2024
Ans. Use Floyd’s slow and fast pointer method. Start both at the head, move slow one step and fast two steps each time. If they ever meet, there is a cycle. If fast reaches null, there is no cycle. This uses no extra data structure, runs in O(n) time and O(1) space.
Q. Explain virtual memory and its benefits
asked 1xmediumOperating systemsTechnical2015
Ans. Virtual memory is an operating system technique that gives each process the illusion of a large, private, continuous address space, mapped to physical RAM and sometimes disk. Its main benefits are isolation between processes, simpler memory management for programs, efficient sharing of memory, and the ability to run programs larger than available RAM.
Q. How do you resolve workplace conflicts?
asked 1xmediumConflict resolutionTechnical2022
Ans. Choose a real conflict where the stakes were meaningful but professional, not personal drama. Emphasise listening first, separating facts from assumptions, agreeing on shared goals, and finding a practical resolution. Interviewers listen for emotional control, ownership, respect for others, clear communication, and evidence that the relationship and work both improved.
Q. Conceptual questions on DBMS fundamentals
asked 1xmediumDBMSTechnical2021
Ans. A DBMS is software that stores, organises and retrieves data while enforcing rules for correctness and access. The key fundamentals are schemas, tables, keys, relationships, SQL, indexing, normalisation, transactions and concurrency control. The most important detail is ACID transactions, which keep data consistent even with failures or simultaneous users.
Q. What is shallow copy and deep copy in C++?
asked 1xmediumOOPTechnical2025
Ans. A shallow copy copies the object’s member values as they are, so pointer members still point to the same memory. A deep copy creates new owned resources and copies the pointed-to data too. The key issue is ownership: shallow copies of owning raw pointers can cause shared mutation, dangling pointers, or double deletion.
Q. What are memory leak and memory corruption?
asked 1xmediumOperating systemsTechnical2020
Ans. A memory leak is memory that is allocated but never released, so the program gradually uses more memory. Memory corruption is when a program writes to or reads from memory it should not, damaging data or control information. The key difference is that leaks waste memory, while corruption can cause crashes, wrong results, or security bugs.
Q. What are the differences between AWS and GCP?
asked 1xmediumCloud computingTechnical2021
Ans. AWS and GCP are both major cloud platforms, but AWS has the largest service catalogue and market share, while GCP is strongest in data analytics, machine learning, Kubernetes and global networking. AWS is often chosen for maturity and breadth. GCP is often chosen for simpler pricing, BigQuery, and cloud-native engineering.
Q. What is RAG (Retrieval-Augmented Generation)?
asked 1xmediumAi mlTechnical2025
Ans. RAG is a technique where a generative AI model retrieves relevant external information before producing an answer. Instead of relying only on what the model learned during training, it searches sources such as documents, databases, or vector indexes, then uses that context to generate a more accurate and up-to-date response.
Q. What are the new features introduced in Java 8?
asked 1xmediumOOPTechnical2020
Ans. Java 8 introduced lambda expressions, functional interfaces, the Stream API, default and static methods in interfaces, Optional, the new Date and Time API, method references, and CompletableFuture improvements. The most important change was functional-style programming, where lambdas and streams made collection processing more concise, expressive, and easier to parallelise.
Q. Explain how a web page is rendered in a browser.
asked 1xmediumNetworkingTechnical2025
Ans. A browser renders a web page by fetching resources, parsing HTML into the DOM, parsing CSS into the CSSOM, combining them into a render tree, then doing layout, painting and compositing. The key detail is that JavaScript and CSS can block or change this pipeline, causing reflow or repaint when the page changes.
Q. Explain public key and private key usage in AWS.
asked 1xmediumCloudTechnical2023
Ans. In AWS, a public key is stored or shared to identify and encrypt for you, while the private key is kept secret and used to prove identity or decrypt. For EC2 key pairs, AWS keeps the public key on the instance, and you use the private key to SSH in securely.
Q. Convert a prefix expression to postfix expression
asked 1xmediumStacksOnline test2019
Ans. Scan the prefix expression from right to left using a stack. When you see an operand, push it. When you see an operator, pop the top two expressions, combine them as first second operator, and push the result back. At the end, the stack top is the postfix expression. Time and space complexity are O(n).
Q. Explain the basics of SSH and socket programming.
asked 1xmediumNetworkingTechnical2020
Ans. SSH is a secure protocol for remote login and command execution, while socket programming is the way applications create network connections. SSH usually runs over TCP port 22 and uses encryption plus password or key authentication. Sockets expose endpoints where programs bind, listen, connect, send, and receive data using TCP or UDP.
Q. If your team resists your idea, what will you do?
asked 1xmediumConflict resolutionTechnical2022
Ans. Pick a real example where you faced reasonable pushback, not stubborn opposition. Emphasise listening first, testing assumptions, using data, adapting the idea, and giving credit to others. Interviewers listen for humility, collaboration, resilience, and whether you can influence without authority while still keeping the team goal ahead of your ego.
Q. What are the differences between C++14 and C++20?
asked 1xmediumOOPTechnical2023
Ans. C++20 is a much larger update than C++14, adding major language features such as concepts, ranges, modules, coroutines, the three-way comparison operator, and broader constexpr support. C++14 mainly refined C++11 with generic lambdas, return type deduction, variable templates, and make_unique. The biggest practical difference is clearer generic programming with concepts.
Q. What is a critical section and how is it handled?
asked 1xmediumOperating systemsTechnical2015
Ans. A critical section is a part of a program where shared resources, such as variables, files or data structures, are accessed and must not be used by multiple threads at the same time. It is handled using synchronisation mechanisms such as locks, mutexes, semaphores or monitors to ensure mutual exclusion and prevent race conditions.
Q. Flatten a linked list with next and child pointers
asked 1xmediumLinked listsOnline test2024
Ans. Flatten it with a depth-first traversal, placing each child list immediately after its parent before continuing with the saved next node. Use recursion that returns the tail, or an explicit stack to remember next pointers. Set each child pointer to null after splicing. This visits each node once, so time is O(n) and space is O(depth).
Q. What is SQL injection and how can it be prevented?
asked 1xmediumDBMSTechnical2023
Ans. SQL injection is an attack where untrusted input is treated as part of an SQL command, allowing an attacker to read, change, or delete data. Prevent it by using parameterised queries or prepared statements, so values are bound separately from SQL code. Also validate input and use least-privilege database accounts.
Q. Explain threads and their advantages over processes
asked 1xmediumOperating systemsTechnical2015
Ans. Threads are independent paths of execution within the same process, sharing its memory and resources. Compared with processes, they are usually faster to create, cheaper to switch between, and simpler for sharing data. The key trade-off is that shared memory requires careful synchronisation to avoid race conditions and deadlocks.
Q. Find the number of distinct paths between N points.
asked 1xmediumDynamic programmingOnline test2021
Ans. If every pair of points can be joined directly and direction does not matter, the number is N(N-1)/2. This is choose 2 because each path is defined by two endpoints, and A to B is the same as B to A. If direction matters, use N(N-1).
Q. What are interrupts and how does an interrupt work?
asked 1xmediumOperating systemsTechnical2024
Ans. Interrupts are signals that make the CPU pause its current work and run a special handler for an event. The CPU saves its current state, jumps to the interrupt service routine, handles the event, then restores the saved state and continues. They let hardware or software get immediate attention without constant polling.
Q. What are iterators in C++ and what is range in C++?
asked 1xmediumOOPTechnical2023
Ans. Iterators in C++ are objects that act like pointers to elements in a container, letting you traverse and access values. A range is a sequence of elements represented by a beginning and an end, often begin and end iterators. Most standard algorithms work on ranges, usually using half-open intervals: begin included, end excluded.
Q. Answer questions related to software design patterns
asked 1xmediumDesign patternsTechnical2015
Ans. Software design patterns are reusable solutions to common design problems, such as object creation, behaviour coordination, or structuring relationships between classes. The most important point is to use them to improve clarity, flexibility, and maintainability, not to force them into simple code where they add unnecessary complexity.
Q. Compare paging and segmentation in memory management.
asked 1xmediumOperating systemsTechnical2024
Ans. Paging divides memory into fixed-size pages and frames, while segmentation divides a program into variable-size logical units such as code, stack and data. Paging avoids external fragmentation but can have internal fragmentation. Segmentation matches the programmer’s view and supports protection per segment, but suffers from external fragmentation and may need compaction.
Q. What is a Turing machine and what is finite automata?
asked 1xmediumTheory of computationTechnical2023
Ans. A Turing machine is a theoretical model of computation with an infinite tape, a read/write head, states, and rules; a finite automaton is a simpler model with a finite number of states and input transitions. The key difference is memory: Turing machines have unbounded memory, while finite automata have only state memory.
Q. Answer conceptual questions related to C++ programming
asked 1xmediumOOPTechnical2015
Ans. C++ is a compiled, statically typed language that supports procedural, object-oriented and generic programming. The key concept is resource management: prefer RAII, where objects acquire resources in constructors and release them in destructors, using standard library containers and smart pointers instead of manual memory management where possible.
Q. Conceptual questions on Operating Systems fundamentals
asked 1xmediumOperating systemsTechnical2021
Ans. Operating systems manage hardware resources and provide services for programs. The core ideas are processes and threads, CPU scheduling, memory management, file systems, system calls, synchronisation, deadlocks and I/O management. The most important detail is that the OS abstracts hardware while enforcing isolation, fairness and efficient resource sharing among running programs.
Q. Convert Linux commands into their octal representation.
asked 1xmediumOperating systemsOnline test2023
Ans. Use the permission bits: read is 4, write is 2, execute is 1, and add them for user, group and others. For example, rwxr-xr-- becomes 754: user 4+2+1, group 4+1, others 4. Special bits may add a leading digit.
Q. Which data structure is used to implement cache memory?
asked 1xmediumData structuresTechnical2023
Ans. Cache memory is commonly implemented using a hash table for fast lookup. In many software caches, such as an LRU cache, a hash map is combined with a doubly linked list so items can be found, inserted, removed, and reordered in constant time on average.
Q. Find the largest palindromic substring in a given string
asked 1xmediumStringsOnline test2021
Ans. Expand around every possible centre and keep the longest palindrome seen. For each index, check both odd length and even length centres, moving left and right while characters match. This uses constant extra space and runs in O(n²) time, which is usually acceptable unless Manacher’s O(n) algorithm is specifically required.
Q. Solve the Coin Change problem using dynamic programming.
asked 1xmediumDynamic programmingTechnical2021
Ans. Use a one-dimensional DP array where dp[x] stores the minimum number of coins needed to make amount x. Initialise dp[0] to 0 and all other entries to infinity, then for each amount try every coin and update dp[x]. The answer is dp[amount], or -1 if unreachable. Time is O(amount × coins), space is O(amount).
Q. Count the number of subarrays with sum exactly equal to K
asked 1xmediumArraysOnline test2024
Ans. Use a running prefix sum and a hash map of prefix sum frequencies. For each element, update the prefix sum, then add the number of times prefix sum minus K has been seen, because those starts form subarrays ending here. Store the current prefix sum. Initialise sum 0 with frequency 1. Time is O(n), space is O(n).
Q. Describe how you handle a challenging or unexpected situation.
asked 1xmediumConflict resolutionTechnical2023
Ans. Pick a real situation where something changed suddenly, such as a deadline, mistake, conflict, or missing resource. Emphasise how you stayed calm, assessed priorities, communicated early, and took practical action. Interviewers listen for ownership, judgement, resilience, and learning, not a perfect outcome or blame placed on others.
Q. Given a rope that burns out in 1 hour, how will you measure 45 minutes using it?
asked 1xmediumLogical reasoningTechnical2025
Ans. With only one non-uniform rope, you cannot reliably measure 45 minutes. Lighting one end gives 60 minutes, and lighting both ends gives 30 minutes, but there is no known point for 45. The standard 45-minute solution needs two such ropes: use one to mark 30 minutes, then the other to mark 15 more.
Q. What factors should be considered while designing a website for a grocery store?
asked 1xmediumWeb designTechnical2025
Ans. Design around product discovery, accurate inventory, pricing, promotions, checkout speed, delivery or pickup slots, payments, substitutions, and customer support. The most important detail is real-time stock and fulfilment integration by store, because grocery customers need reliable availability, fresh items, and delivery promises that match local operations.
Q. Memory-based puzzle requiring recalling objects or patterns seen a short time ago
asked 1xmediumLogical reasoningOnline test2019
Ans. The answer depends on the objects shown, so I would recreate the scene systematically. I would first recall the overall layout, then group items by position, colour, shape, or category. I would mentally scan left to right and check for anything unusual, because distinctive details are usually easiest to recover accurately.
Q. Explain microservices communication patterns, including API Gateway and RestTemplate.
asked 1xmediumMicroservicesTechnical2024
Ans. Microservices commonly communicate synchronously through HTTP REST or gRPC, and asynchronously through messaging such as Kafka or RabbitMQ. An API Gateway is the single entry point for clients, handling routing, authentication, rate limits and aggregation. RestTemplate is Spring’s older synchronous HTTP client for service-to-service REST calls, usually combined with timeouts, retries and service discovery.
Q. How would you design a system to shorten a long URL and map it back to the original URL?
asked 1xmediumDesignManagerial2025
Ans. I would create a short code for each long URL, store the mapping in a database, and redirect requests by looking up that code. The key detail is generating unique codes reliably, often with an atomic counter or distributed ID generator encoded in Base62. Add caching for popular links, expiry rules, and analytics if needed.
Q. Find the fastest 3 horses out of 25 using minimum races
asked 1xhardLogical reasoningTechnical2024
Ans. Minimum is 7 races. Race five groups of five. Race the five winners. The winner of that race is fastest. Only horses that could still be second or third are: second and third from the fastest winner’s group, first and second from the second fastest winner’s group, and first from the third fastest winner’s group. Race those five. Top two complete the top three.
Showing 60 of 473 questions. Ranked by how often the same question came back across interviews.