Q. Explain different types of joins in SQL.
asked 3xeasySQLTechnical2020-2021
Ans. SQL joins combine rows from related tables using a matching condition, usually a key. INNER JOIN returns only matching rows. LEFT JOIN returns all rows from the left table plus matches from the right. RIGHT JOIN is the reverse. FULL OUTER JOIN returns all rows from both sides. CROSS JOIN returns every combination of rows.
Q. Write an SQL query using ORDER BY and LIMIT clauses.
asked 3xeasySQLOnline test2020-2021
Ans. Select the required columns from the table, sort the result with ORDER BY, then restrict the number of returned rows with LIMIT. For example, to get the ten highest paid employees, query the employees table ordered by salary in descending order and limit the output to 10 rows. ORDER BY comes before LIMIT.
Q. Difference between JDK 1.7 and JDK 1.8
asked 2xmediumJavaTechnical2020
Ans. JDK 1.8 mainly added functional programming features over JDK 1.7, especially lambda expressions and the Stream API. It also introduced default and static methods in interfaces, Optional, the new java.time date API, and Nashorn JavaScript engine. JVM-wise, Java 8 replaced PermGen with Metaspace.
Q. How is data stored in NoSQL databases?
asked 2xmediumDBMSTechnical2020
Ans. Data in NoSQL databases is stored in non-relational structures such as key-value pairs, documents, wide-column tables, or graphs. The main point is that the schema is usually flexible, so records do not all need the same fields. Data is often partitioned and replicated across servers for scale and availability.
Q. Detect a loop in a linked list
asked 2xeasyLinked listsOnline test, Technical2019-2020
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-2024
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. Explain exception handling in Java
asked 2xeasyOOPTechnical2020-2021
Ans. Exception handling in Java is a mechanism for dealing with runtime errors without abruptly stopping normal program flow. Risky code is placed in a try block, errors are handled in catch blocks, and cleanup goes in finally. Java has checked exceptions, which must be caught or declared, and unchecked exceptions.
Q. Explain commonly used Unix commands
asked 2xeasyOperating systemsTechnical2020-2021
Ans. Common Unix commands include ls to list files, cd to change directory, pwd to show the current directory, cp to copy, mv to move or rename, rm to delete, mkdir to create directories, cat to print files, grep to search text, chmod to change permissions, ps to view processes, and kill to stop them.
Q. Difference between JRE, JDK, and JVM
asked 2xeasyJavaTechnical2020
Ans. JVM runs Java bytecode, JRE provides the environment to run Java applications, and JDK provides tools to develop them. The key difference is scope: JVM is the execution engine, JRE includes JVM plus runtime libraries, and JDK includes JRE plus developer tools such as the compiler, debugger, and packaging utilities.
Q. Difference between DELETE and TRUNCATE in SQL
asked 2xeasyDBMSTechnical2020
Ans. DELETE removes selected rows and can use a WHERE clause, while TRUNCATE removes all rows from a table. DELETE is usually row logged, can fire delete triggers, and is slower for large tables. TRUNCATE deallocates data pages, is faster, often resets identity values, and cannot be used when referenced by foreign keys.
Q. What is method overloading and method overriding?
asked 2xeasyOOPTechnical2020
Ans. Method overloading means defining multiple methods with the same name but different parameter lists in the same class. Method overriding means a subclass provides its own implementation of a method already defined in its superclass. Overloading is resolved at compile time, while overriding uses runtime polymorphism.
Q. Check whether a given string or number is a palindrome.
asked 2xeasyStringsTechnical2021
Ans. Use two pointers, one at the start and one at the end, and compare characters while moving inward. For a number, either convert it to a string or reverse its digits and compare with the original. The string approach uses constant extra data and runs in O(n) time.
Q. Perform simple array manipulation operations on a given array.
asked 2xeasyArraysOnline test2020-2021
Ans. Use the array directly and apply the required operation by index or by scanning. Traversal and update take O(n) and O(1) respectively, search takes O(n), insertion or deletion takes O(n) because elements may need shifting. The key detail is to handle bounds carefully to avoid invalid access.
Q. Explain the difference between method overloading and method overriding
asked 2xeasyOOPTechnical2015-2020
Ans. Method overloading means defining multiple methods with the same name but different parameter lists in the same class, while method overriding means a subclass provides its own implementation of a method already defined in its parent class. Overloading is resolved at compile time, whereas overriding is resolved at runtime using dynamic dispatch.
Q. Write an SQL query using JOINs, ORDER BY, GROUP BY, LIMIT, SUM, and AVG.
asked 2xeasySQLOnline test2020-2021
Ans. Join the customers, orders, and order_items tables, group rows by customer, calculate SUM of order value and AVG of item price, order by total spend descending, and limit the result to the top customers. The database uses relational tables with indexes on join keys; runtime is roughly proportional to joined rows plus sorting cost.
Q. Explain the difference between function overloading and function overriding.
asked 2xeasyOOPTechnical2020
Ans. Function overloading means defining multiple functions with the same name but different parameter lists, while function overriding means a subclass provides its own implementation of a method already defined in its superclass. Overloading is resolved at compile time in many languages; overriding is resolved at run time using dynamic dispatch.
Q. PL/SQL concepts and queries
asked 1xmediumSQLOnline test2020
Ans. PL/SQL is Oracle’s procedural extension to SQL, used to write blocks, procedures, functions, triggers and packages around database operations. It supports variables, control flow, cursors and exception handling. The key point is to use SQL for set-based queries, such as joins and aggregations, and PL/SQL for procedural logic and error handling.
Q. What is view level in DBMS?
asked 1xmediumDBMSTechnical2020
Ans. The view level in a DBMS is the external level that shows users only the data they need. It provides user-specific views of the database, hiding details of the logical schema and physical storage. Its main purpose is simplicity, security, and controlled access to data.
Q. Explain SDLC and ISO standards.
asked 1xmediumSoftware engineeringTechnical2020
Ans. SDLC is the structured process used to plan, build, test, deploy and maintain software, while ISO standards are internationally agreed guidelines for quality, security and process consistency. The key point is that SDLC defines how software work is carried out, and ISO standards help ensure that work is controlled, repeatable and auditable.
Q. Normalize given database tables
asked 1xmediumDBMSTechnical2021
Ans. Normalize tables by identifying entities, keys, and dependencies, then decomposing them to remove redundancy and update anomalies. Ensure 1NF by making values atomic, 2NF by removing partial dependency on a composite key, and 3NF by removing transitive dependencies. Use primary and foreign keys to preserve relationships and check lossless joins.
Q. Explain singleton classes in C++.
asked 1xmediumOOPTechnical2022
Ans. A singleton class in C++ ensures only one instance of a class exists and provides a global access point to it. Typically, the constructor is private, copying is disabled, and a static method returns a reference to a single static instance. Since C++11, local static initialisation is thread-safe.
Q. Find the height of a binary tree.
asked 1xmediumTreesTechnical2020
Ans. Find the height by doing a depth first traversal and returning 1 plus the maximum height of the left and right subtrees. Use recursion, or an explicit stack if recursion depth is a concern. With height measured in nodes, an empty tree has height 0 and a leaf has height 1. Time is O(n).
Q. Explain merge sort with an example
asked 1xmediumSortingTechnical2020
Ans. Merge sort is a divide and conquer sorting algorithm that repeatedly splits an array into halves, sorts each half, then merges the sorted halves. For example, [5, 2, 8, 1] becomes [5, 2] and [8, 1], then [2, 5] and [1, 8], then [1, 2, 5, 8]. It runs in O(n log n) time.
Q. What are dangling pointers in C++?
asked 1xmediumMemory managementTechnical2022
Ans. Dangling pointers in C++ are pointers that still hold the address of memory that is no longer valid. This often happens after deleting dynamically allocated memory, returning the address of a local variable, or using an object after it has gone out of scope. Dereferencing them causes undefined behaviour, so set pointers to nullptr or use smart pointers.
Q. UNIX command-line related questions
asked 1xmediumOperating systemsOnline test2020
Ans. The UNIX command line is used to run programs, manage files, inspect processes and combine tools through pipes and redirection. Common essentials are ls, cd, pwd, cp, mv, rm, cat, grep, find, chmod, ps and kill. The key idea is that each command does one job and can be chained with others.
Q. Coding problems of medium difficulty
asked 1xmediumMixedOnline test2020
Ans. Medium difficulty coding problems usually require choosing the right pattern, not just implementing a known formula. I would first identify whether it is array, string, graph, tree, dynamic programming, or heap based, then state the approach, the data structure used, and the time and space complexity clearly before coding.
Q. Explain Link State Routing protocols
asked 1xmediumNetworkingTechnical2017
Ans. Link State Routing protocols let each router learn the full network topology by flooding information about its directly connected links to all other routers. Each router then independently runs Dijkstra’s shortest path algorithm to build its routing table. OSPF and IS-IS are common examples, with fast convergence but higher memory and processing cost.
Q. What is a lambda expression in Java?
asked 1xmediumJavaTechnical2020
Ans. A lambda expression in Java is a concise way to represent an anonymous function that can be passed around as a value. It is mainly used to implement a functional interface, which is an interface with one abstract method, often making callbacks, streams, and collection operations shorter and clearer.
Q. What is operator overloading in C++?
asked 1xmediumOOPTechnical2020
Ans. Operator overloading in C++ lets a class define how existing operators, such as +, ==, or [], work with its objects. It is implemented by writing special operator functions. The key point is that it should preserve intuitive meaning, and it cannot create new operators or change precedence or associativity.
Q. How will you prevent race conditions?
asked 1xmediumOperating systemsTechnical2020
Ans. Prevent race conditions by avoiding shared mutable state, or by synchronising every access to it when sharing is necessary. Use mutexes, locks, atomic operations, transactions, or thread-safe data structures. The key detail is consistency: all reads and writes to the same state must follow the same synchronisation rule.
Q. Implement a linked list from scratch.
asked 1xmediumLinked listsTechnical2022
Ans. Implement it with a Node structure holding data and a next reference, and a LinkedList class holding the head, optionally the tail and size. Insertion at the head is O(1), insertion at the tail is O(1) with a tail pointer, search and deletion by value are O(n), and traversal is O(n).
Q. Which SDLC model is the best and why?
asked 1xmediumSoftware engineeringTechnical2020
Ans. There is no single best SDLC model, but Agile is often the best choice when requirements can change. It delivers software in small increments, gets regular customer feedback, and reduces the risk of building the wrong product. For fixed, well understood requirements, Waterfall can still be suitable.
Q. Design a theatre ticket booking system
asked 1xmediumDesignTechnical2019
Ans. Build services for shows, seating, pricing, booking and payment, backed by a relational database with seats, performances and bookings. The critical detail is preventing double booking: when a user selects seats, create a short-lived reservation with row-level locking or optimistic concurrency, expire it if unpaid, and confirm only after successful payment.
Q. Explain late binding and early binding.
asked 1xmediumOOPTechnical2019
Ans. Early binding means the method or function to call is decided at compile time, while late binding means it is decided at runtime. Early binding is usually faster and used for static, overloaded, or non-virtual calls. Late binding enables polymorphism, such as calling an overridden method through a base class reference.
Q. How does a Java socket connection work?
asked 1xmediumNetworkingTechnical2017
Ans. A Java socket connection is a TCP connection between a client Socket and a server Socket accepted from a ServerSocket. The server binds to a port, listens, and accepts incoming clients. The client connects to the host and port. Both sides read and write bytes through input and output streams, then close resources.
Q. How does memory allocation work in C++?
asked 1xmediumMemory managementTechnical2024
Ans. C++ allocates memory mainly as automatic storage on the stack, dynamic storage on the heap, and static storage for globals and statics. Stack objects are freed automatically when scope ends. Heap objects are created with new or library allocators and must be released, preferably through RAII containers or smart pointers, which also run destructors correctly.
Q. Detect and remove a loop in a linked list.
asked 1xmediumLinked listsTechnical2020
Ans. Use Floyd’s slow and fast pointer method to detect the loop, then remove it by finding the node where the cycle starts and setting the previous node’s next pointer to null. After slow and fast meet, move one pointer to head and advance both one step at a time. Time is O(n), space is O(1).
Q. Explain const pointer vs pointer to const.
asked 1xmediumOOPTechnical2016
Ans. A const pointer means the pointer value cannot change, while a pointer to const means the object it points at cannot be modified through that pointer. For example, a const pointer must keep the same address, but may change the value there. A pointer to const may point elsewhere.
Q. Explain pointers and their types in C/C++.
asked 1xmediumOOPTechnical2021
Ans. A pointer is a variable that stores the memory address of another object or function. Its declared type controls how the address is dereferenced and how pointer arithmetic works. Common forms include data pointers, void pointers, function pointers, null pointers, pointer-to-pointer, const pointers, and pointers to const. C++ also has smart pointers for ownership management.
Q. What are lifecycle methods in Spring Boot?
asked 1xmediumOOPTechnical2023
Ans. Spring Boot lifecycle methods are hooks that run at key points when beans or the application start and stop. Common bean hooks are @PostConstruct for initialisation and @PreDestroy for cleanup. Alternatives are InitializingBean, DisposableBean, custom init and destroy methods, and ApplicationRunner or CommandLineRunner for code after startup.
Q. Write a SQL query using JOIN or a subquery
asked 1xmediumSQLOnline test2020
Ans. Use an INNER JOIN to return rows where related keys match, such as employees with their department names by joining Employee.department_id to Department.id. The database treats tables as relations and may use indexes or a hash join. With indexed keys, lookup is roughly logarithmic per row; hash join is usually linear overall.
Q. Write a method to validate a phone number.
asked 1xmediumStringsTechnical2020
Ans. Validate a phone number by first normalising input, then checking it against a strict pattern such as E.164: optional plus sign, country code, and 7 to 15 digits. Use a regular expression as the main data structure. The check is linear in the length of the string, O(n).
Q. Explain merge sort and its time complexity.
asked 1xmediumSortingTechnical2016
Ans. Merge sort is a divide and conquer sorting algorithm that splits the array into halves, recursively sorts each half, then merges the sorted halves. Its time complexity is O(n log n) in best, average, and worst cases because each level processes all n elements and there are log n levels. It usually needs O(n) extra space.
Q. Explain AVL Tree and its balancing mechanism
asked 1xmediumTreesTechnical2017
Ans. An AVL tree is a self-balancing binary search tree where, for every node, the heights of the left and right subtrees differ by at most one. It stores or computes a balance factor and, after insertion or deletion, restores balance using rotations: single rotations for left-left or right-right cases, and double rotations for left-right or right-left cases. Operations stay O(log n).
Q. What happens when we override a constructor?
asked 1xmediumOOPTechnical2019
Ans. You cannot override a constructor. Constructors are not inherited like normal methods, so a subclass can only define its own constructors, not replace the parent’s one. When an object is created, the parent constructor still runs first, either through an explicit super call or an implicit no-argument super call.
Q. Explain how HashMap works internally in Java.
asked 1xmediumOOPTechnical2019
Ans. A Java HashMap stores key value pairs in an array of buckets, using the key’s hashCode to choose a bucket and equals to find the exact key. Collisions are handled by a linked list, or a balanced tree after enough entries. It resizes when the load factor threshold is crossed, giving average constant time operations.
Q. Find the 2's complement representation of -5.
asked 1xmediumOperating systemsTechnical2016
Ans. In 8-bit two’s complement, -5 is 11111011. Start with +5 as 00000101, invert the bits to get 11111010, then add 1 to get 11111011. The exact pattern depends on the chosen bit width, but the method is the same.
Q. Detect whether a linked list contains a cycle.
asked 1xmediumLinked listsOnline test2020
Ans. Use Floyd’s cycle detection with two pointers, slow and fast. Move slow one node at a time and fast two nodes at a time. If they ever meet, the list has a cycle. If fast reaches null, there is no cycle. This runs in O(n) time and O(1) space.
Q. Explain basics of mobile communication systems
asked 1xmediumNetworkingTechnical2017
Ans. Mobile communication systems let users send voice, data and messages wirelessly through radio signals between mobile devices and network infrastructure. The key idea is cellular architecture: coverage is divided into cells, each served by a base station, allowing frequency reuse, mobility management, handover between cells, and connection to wider telephone and internet networks.
Q. Discuss your views on the rise of Generative AI
asked 1xmediumCommunicationGroup discussion2024
Ans. A strong answer shows balanced optimism: Generative AI can improve productivity, creativity and access to knowledge, but needs human judgement, data protection and ethical use. Pick an example where you explored or applied AI responsibly. Emphasise learning mindset, practical business value, risk awareness and adaptability. Interviewers listen for maturity, not hype or fear.
Q. Find the missing value: 2+5=10, 6+6=72, 8+9=136, 4+11=?
asked 1xmediumLogical reasoningTechnical2016
Ans. There is no unique answer from the data as written. The common pattern is result = first number × (first number + second number): 6 × 12 = 72 and 8 × 17 = 136. That gives 4 × 15 = 60. But 2 + 5 would be 14, not 10.
Q. On what factors would you choose your idea over your colleague's idea?
asked 1xmediumDecision makingTechnical2021
Ans. A strong answer should focus on objective criteria: customer value, business impact, evidence, feasibility, cost, risk, timing, and alignment with goals. Pick a situation where you compared ideas fairly and listened well. Emphasise collaboration, not ego. Interviewers listen for sound judgement, openness to challenge, and commitment to the best outcome.
Q. Can you create an Android app to automate this Outlook-to-WhatsApp process?
asked 1xmediumMobile appTechnical2021
Ans. Yes, but only partly if it must use the consumer WhatsApp app. The app can read Outlook mail through Microsoft Graph, parse or filter messages, and prepare WhatsApp messages, but Android and WhatsApp do not allow reliable silent sending. For full automation, use the WhatsApp Business Cloud API with user opt-in and approved templates.
Q. Situational questions to assess problem handling and decision making at work
asked 1xmediumConflict resolutionTechnical2024
Ans. Choose a recent, work-related situation with real pressure, unclear options, and a measurable outcome. Emphasise how you identified the problem, gathered facts, weighed risks, involved others, made a decision, and followed through. Interviewers listen for calm judgement, ownership, practical trade-offs, communication, learning, and evidence that your actions improved the result.
Q. Puzzle: If the whole world becomes black and white, how would traffic signals work?
asked 1xmediumLogical reasoningHR2020
Ans. Traffic signals would still work by position, not colour. Drivers learn that the top light, or left light on a horizontal signal, means stop. The middle means wait or caution. The bottom, or right light, means go. Even in black and white, the lit lamp’s location gives the instruction.
Q. Solve the 8 balls puzzle (identify the heavier ball using a balance in minimum weighings)
asked 1xmediumLogical reasoningTechnical2020
Ans. Minimum is two weighings. Weigh 3 balls against 3. If they balance, the heavier ball is among the 2 left out, so weigh them against each other. If one side is heavier, take those 3 balls and weigh 1 against 1. If they balance, the third is heavier; otherwise the heavier side is the answer.
Q. How would you design and test a railway ticket booking system end-to-end following the SDLC?
asked 1xmediumApplication designTechnical2020
Ans. Design it through the SDLC by capturing booking, payment, cancellation and admin requirements, modelling services for search, inventory, booking and payment, then building APIs with transactional seat locking. Test end to end with unit, integration, load, failure and user acceptance tests. The key detail is preventing double booking under concurrency.
Q. Direction sense test problems
asked 1xeasyLogical reasoningOnline test2020
Ans. Draw a simple direction diagram with north at the top, south at the bottom, east to the right and west to the left. Start from the given point and trace each movement step by step. Mark turns carefully as left or right relative to current direction. Finally compare the end point with the start point.
Q. Aptitude and logical reasoning questions
asked 1xeasyLogical reasoningOnline test2020
Ans. Identify the question type first, then write down the given facts clearly. Convert words into equations, tables, diagrams, or sequences where useful. Eliminate impossible options and check units, order, and conditions carefully. For reasoning puzzles, test one assumption at a time and verify the final answer against every statement.
Q. Find the last digit of a given number/expression
asked 1xeasyNumber systemOnline test2020
Ans. Find the last digit by considering only the last digit of each number and using cyclic patterns. Powers repeat in cycles, such as 2, 4, 8, 6 for powers of 2. Reduce the exponent using the cycle length. For products, multiply last digits only. For sums or differences, combine last digits and adjust modulo 10.
Showing 60 of 415 questions. Ranked by how often the same question came back across interviews.