Q. Explain ACID properties in DBMS
asked 3xeasyDBMSTechnical2019-2023
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 different types of SQL joins
asked 3xeasySQLTechnical2020-2023
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. Largest Number Of Vaccines
asked 2xmediumArraysOnline test2020
Ans. Sort vaccine strengths and patient requirements, then greedily match the weakest vaccine that can satisfy the easiest remaining patient. Use two pointers over the sorted arrays and count each successful match. This works because using a stronger vaccine early can only reduce future options. Time complexity is O(n log n + m log m).
Q. Write an SQL query based on a given problem statement
asked 2xmediumSQLOnline test2023-2025
Ans. Start by identifying the required output columns, source tables, join keys, filters, grouping, and ordering. Then build the query in that order: select fields, join tables, apply where conditions, aggregate with group by, filter aggregates with having, and sort. The key detail is handling duplicates and nulls correctly.
Q. Cardinality and Arrays for Sets using Dynamic Programming
asked 2xmediumDynamic programmingOnline test2020
Ans. Represent each set as a bitmask, store its value in a DP array indexed by that mask, and use the mask’s population count as the set cardinality. The key detail is that transitions add or remove one element by flipping a bit. This gives O(n2^n) time and O(2^n) space.
Q. Is Java 100% object-oriented? Justify your answer.
asked 2xeasyOOPTechnical2019-2021
Ans. No, Java is not 100% object-oriented. The main reason is that it has primitive types such as int, char, boolean and double, which are not objects. It also supports static methods and variables, which belong to a class rather than an object. Java is strongly object-oriented, but not purely object-oriented.
Q. Differentiate between multiple inheritance and multilevel inheritance
asked 2xeasyOOPTechnical2020
Ans. Multiple inheritance means one class inherits from more than one parent class, while multilevel inheritance means a class inherits from a child class, forming a chain across levels. The key difference is structure: multiple inheritance combines features from several parents, whereas multilevel inheritance passes behaviour down a hierarchy such as grandparent, parent, and child.
Q. Explain Barclays values (RISES)
asked 2xunknownCompany valuesTechnical2021-2023
Ans. Pick a real example showing several RISES values: Respect, Integrity, Service, Excellence and Stewardship. Use a situation with pressure, competing priorities or a difficult stakeholder. Emphasise honest judgement, collaboration, customer focus, high standards and long-term thinking. Interviewers listen for evidence that your behaviour matches the values, not just that you know them.
Q. Sort a 2D matrix.
asked 1xmediumArraysOnline test2017
Ans. Flatten the matrix into a one-dimensional array, sort it, then write the values back into the matrix row by row. Use an array or list to store all elements. If the matrix has m rows and n columns, the time complexity is O(mn log(mn)) and the extra space is O(mn).
Q. Write an API using Node.js
asked 1xmediumBackendTechnical2024
Ans. Build a Node.js API with Express by defining REST routes, middleware for validation and authentication, controllers for business logic, and a repository layer for database access. Use JSON request and response bodies, clear status codes, and central error handling. Store records in a database indexed by id, giving typical lookups O(1) or O(log n).
Q. What is the Java String Pool?
asked 1xmediumOOPTechnical2019
Ans. The Java String Pool is a special area on the heap where Java stores unique String literals. When the same literal appears again, Java reuses the existing String object instead of creating a new one. This saves memory, but it also means == may be true for pooled strings, while equals checks content.
Q. Why choose MongoDB over MySQL?
asked 1xmediumDBMSTechnical2022
Ans. Choose MongoDB over MySQL when your data is document-shaped, changes often, or needs flexible schema design. It stores nested JSON-like documents naturally, so related data can be read without many joins. It is also well suited to horizontal scaling and rapid product changes, though MySQL is often better for strict relational integrity.
Q. Solve a slightly tricky SQL query
asked 1xmediumSQLTechnical2022
Ans. Use a common table expression to build the exact intermediate result, then apply the final filter or aggregation on top of it. For most tricky SQL questions, the key detail is row grain: decide what one row represents before joining, grouping, or using window functions. This avoids duplicates and wrong totals.
Q. Why are strings immutable in Java?
asked 1xmediumOOPTechnical2019
Ans. Strings are immutable in Java to make them safe, efficient, and predictable. Immutability lets string literals be shared in the string pool without risk of one reference changing another’s value. It also makes strings safe as keys in hash-based collections, because their hash code and contents cannot change after creation.
Q. Compare MVC and MVCC architectures.
asked 1xmediumArchitectureTechnical2021
Ans. MVC is an application design pattern, while MVCC is a database concurrency control technique. MVC separates an application into Model, View and Controller to organise code and user interaction. MVCC lets transactions read consistent snapshots while writes create new versions, improving concurrency without blocking readers in systems such as PostgreSQL.
Q. Solve a medium-difficulty SQL query
asked 1xmediumSQLTechnical2022
Ans. Use the smallest correct join, filter rows before grouping, aggregate with GROUP BY, and use a window function when you need ranking, running totals, or “top N per group”. The key detail is to preserve row granularity: WHERE filters input rows, HAVING filters grouped results, and window functions calculate across rows without collapsing them.
Q. Explain the Singleton class pattern.
asked 1xmediumOOPTechnical2019
Ans. The Singleton pattern ensures a class has exactly one instance and provides a single global access point to it. Typically, the constructor is private, and a static method returns the shared instance. The key detail is thread safety, especially with lazy creation, so multiple threads cannot create separate instances.
Q. Explain concurrency concepts in DBMS.
asked 1xmediumDBMSTechnical2017
Ans. Concurrency in a DBMS means allowing multiple transactions to run at the same time while preserving correctness. The key ideas are ACID isolation, serialisability, locking, timestamps, and MVCC. These prevent problems such as dirty reads, lost updates, and inconsistent reads. The main trade-off is between data consistency and system throughput.
Q. Explain key Java concepts and features
asked 1xmediumOOPTechnical2020
Ans. Java is an object oriented, class based language designed for portability, safety and maintainability. Key concepts include classes, objects, inheritance, polymorphism, encapsulation, interfaces, exceptions, generics and packages. Important features are the JVM, garbage collection, strong typing, bytecode portability, multithreading support, rich standard libraries and automatic memory management.
Q. How do you create a responsive website?
asked 1xmediumWeb developmentTechnical2019
Ans. Create a responsive website by designing mobile first, using fluid layouts, flexible images, and CSS media queries to adapt the interface to different screen sizes. The most important detail is avoiding fixed widths where possible, so content can reflow naturally across phones, tablets, and desktops while remaining readable and usable.
Q. What is Third Normal Form (3NF) in DBMS?
asked 1xmediumDBMSTechnical2016
Ans. Third Normal Form is a database design rule where a table is in Second Normal Form and has no transitive dependencies. Every non-key attribute must depend only on a candidate key, not on another non-key attribute. This reduces redundancy and avoids update, insert, and delete anomalies.
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. Explain any two CPU scheduling algorithms
asked 1xmediumOperating systemsTechnical2021
Ans. First Come, First Served runs processes in the order they arrive, while Round Robin gives each process a fixed time slice in turn. FCFS is simple but can cause long waiting times if a long job arrives first. Round Robin improves responsiveness for interactive systems, but performance depends on choosing a suitable time quantum.
Q. SQL queries and database-related questions
asked 1xmediumSQLTechnical2021
Ans. SQL is used to query, filter, join, group and modify data in relational databases. The most important detail is understanding how tables relate through keys, because joins, constraints, indexes and normalisation all depend on that. Good answers should mention correctness first, then performance with indexes and query plans.
Q. What are the merits of MongoDB over MySQL?
asked 1xmediumDBMSTechnical2021
Ans. MongoDB is better than MySQL when the data is semi-structured, changes often, or maps naturally to JSON-like documents. Its main merits are flexible schema design, easier storage of nested objects, horizontal scaling through sharding, and high write throughput. MySQL is usually stronger for strict relational data and complex joins.
Q. What is the fragment lifecycle in Android?
asked 1xmediumAndroidTechnical2021
Ans. The fragment lifecycle is the sequence of states and callbacks a Fragment goes through as it is added, displayed, paused, stopped and destroyed. Common callbacks include onAttach, onCreate, onCreateView, onViewCreated, onStart, onResume, onPause, onStop, onDestroyView, onDestroy and onDetach. The key detail is that the Fragment lifecycle and its view lifecycle are separate.
Q. Explain Data Warehousing and ETL processes.
asked 1xmediumDBMSTechnical2021
Ans. Data warehousing is storing integrated, historical data from different systems in a central repository for reporting and analysis. ETL means extract, transform and load: data is collected from sources, cleaned and reshaped into a common format, then loaded into the warehouse. The key point is consistency, so business queries use trusted data.
Q. Write a SQL query using the GROUP BY clause.
asked 1xmediumSQLTechnical2020
Ans. Select the grouping column and an aggregate, for example employee department and employee count, from the employees table grouped by department. GROUP BY combines rows with the same key, then applies aggregates such as count, sum, or average. Databases commonly use hash or sort aggregation, with roughly linear work over the input rows.
Q. Explain the memory management model of Python
asked 1xmediumPythonTechnical2021
Ans. Python manages memory automatically using a private heap, with objects allocated and freed by the interpreter rather than manually by the programmer. The key detail is reference counting: when an object’s reference count reaches zero, it is deallocated. Python also has a cyclic garbage collector to reclaim objects involved in reference cycles.
Q. Explain how Spring Framework works internally.
asked 1xmediumOOPTechnical2023
Ans. Spring works mainly through an IoC container that creates, configures and wires application objects called beans. It reads metadata from annotations, XML or configuration classes, builds bean definitions, resolves dependencies, manages lifecycle callbacks, and injects dependencies. For features such as transactions, security and AOP, it often wraps beans in proxies.
Q. Explain key concepts of the Angular framework.
asked 1xmediumFrameworksTechnical2020
Ans. Angular is a TypeScript framework for building client-side applications using components, templates, dependency injection, routing and reactive data flow. Components own view logic, templates bind data to HTML, services share business logic, and dependency injection wires them together. Directives, pipes, forms, RxJS observables and change detection handle UI behaviour and updates.
Q. Differentiate between types of database indexes
asked 1xmediumDBMSTechnical2023
Ans. Database indexes differ mainly by structure, uniqueness, columns covered, and ordering. B-tree indexes support equality and range queries and are the common default. Hash indexes are fast for equality but poor for ranges. Unique indexes enforce no duplicates. Composite indexes cover multiple columns, while clustered indexes define table row order and non-clustered indexes store separate lookup pointers.
Q. Explain DBMS concepts and write 2–3 SQL queries
asked 1xmediumDBMSTechnical2025
Ans. A DBMS stores, organises and controls access to data using tables, keys, constraints, indexes and transactions. Core concepts are schema design, primary and foreign keys, normalisation, ACID properties and SQL operations such as select, join, group and update. Typical queries fetch filtered rows, join related tables, and aggregate values by group.
Q. Explain how a HashMap is implemented internally.
asked 1xmediumData structuresTechnical2016
Ans. A HashMap is implemented as an array of buckets, where a key’s hash code is converted into an index in that array. Each bucket stores entries containing key, value, hash, and a next reference. Collisions are handled by chaining, often with linked lists or trees. It resizes when the load factor grows too high.
Q. Explain the internal working of HashMap in Java.
asked 1xmediumOOPTechnical2023
Ans. A HashMap stores key value pairs in an internal array of buckets, using the key’s hashCode to choose a bucket index. If multiple keys land in the same bucket, it compares keys with equals and stores collisions in a linked list or, after enough collisions, a tree. Resizing happens when the load factor threshold is crossed.
Q. What are the necessary conditions for a deadlock?
asked 1xmediumOperating systemsTechnical2021
Ans. The necessary conditions for a deadlock are mutual exclusion, hold and wait, no preemption, and circular wait. A resource must be non-shareable, processes must hold resources while waiting for others, resources cannot be forcibly taken, and a cycle of processes must each wait for the next. All four must hold simultaneously.
Q. What is the difference between MongoDB and MySQL?
asked 1xmediumDBMSTechnical2022
Ans. MongoDB is a NoSQL document database, while MySQL is a relational database that stores data in tables. MongoDB uses JSON-like documents with flexible schema, which suits changing or nested data. MySQL uses SQL, fixed schemas, joins and strong relational constraints, which suits structured transactional systems.
Q. What are the steps to establish a JDBC connection?
asked 1xmediumDBMSTechnical2021
Ans. Establish a JDBC connection by loading the JDBC driver if needed, creating the database URL, username and password, calling DriverManager.getConnection, then using the returned Connection to create statements and run queries. The most important detail is to close Connection, Statement and ResultSet objects, preferably with try-with-resources.
Q. What changes were introduced in HashMap in Java 8?
asked 1xmediumOOPTechnical2023
Ans. Java 8 changed HashMap to handle heavy hash collisions by converting long bucket chains from linked lists into balanced red-black trees. This happens after a threshold, typically eight entries, when the table is large enough. The key benefit is improved worst-case lookup, insertion and deletion from linear time to logarithmic time.
Q. How do you create your own Singleton class in Java?
asked 1xmediumOOPTechnical2019
Ans. Create a Singleton in Java by making the constructor private, storing one static instance inside the class, and exposing it through a public static getInstance method. The key detail is thread safety: use eager initialisation, an enum Singleton, or a properly synchronised lazy approach to avoid multiple instances.
Q. How is a foreign key different from denormalization?
asked 1xmediumDBMSTechnical2021
Ans. A foreign key is a database constraint that links a column to a primary key in another table, while denormalisation is a design choice that duplicates or combines data to reduce joins. The key difference is that foreign keys protect referential integrity, whereas denormalisation trades some integrity and update simplicity for read performance.
Q. Discuss the physical components of an Oracle Database
asked 1xmediumDBMSTechnical2023
Ans. The physical components of an Oracle Database are the files stored on disk: data files, control files, and online redo log files. Data files hold the actual tables, indexes, and other segments. Control files record database structure and checkpoints. Redo log files record changes so the database can recover after failure.
Q. What is threading and what is multithreading in Java?
asked 1xmediumOperating systemsTechnical2019
Ans. Threading is the use of a separate path of execution within a program, and multithreading in Java is running multiple threads within the same process. Threads share the same memory but have their own call stack. The key issue is coordination, because shared data can cause race conditions unless controlled with synchronisation or concurrent utilities.
Q. Discuss various data structures and their applications
asked 1xmediumData structuresTechnical2022
Ans. Data structures organise data for efficient access, update, and storage in different use cases. Arrays suit indexed access, linked lists suit frequent insertions, stacks manage undo and recursion, queues handle scheduling, hash tables provide fast lookup, trees support sorted hierarchical data, heaps support priority tasks, and graphs model networks and relationships.
Q. Compare ArrayList vs LinkedList and HashSet vs TreeSet.
asked 1xmediumOOPTechnical2017
Ans. ArrayList is best for fast index-based access, while LinkedList is better for frequent insertions or removals when you already have the node position. ArrayList shifts elements, so middle changes are costly. HashSet stores unique values with no order and average constant-time operations. TreeSet keeps values sorted, with logarithmic-time operations.
Q. Explain the differences between SQL and NoSQL databases
asked 1xmediumDBMSTechnical2020
Ans. SQL databases use structured tables, fixed schemas and relational queries, while NoSQL databases use flexible models such as documents, key value pairs, wide columns or graphs. SQL is usually chosen for strong consistency, joins and transactions. NoSQL is often chosen for horizontal scaling, high throughput and evolving data structures.
Q. What is JIT (Just-In-Time compiler) and why is it used?
asked 1xmediumOperating systemsTechnical2019
Ans. A JIT compiler translates intermediate code, such as bytecode, into native machine code at runtime. It is used to improve performance while keeping portability, because the same program can be distributed in a platform-independent form and then optimised for the actual machine and runtime behaviour as it runs.
Q. Explain different types of SQL JOINs and their use cases
asked 1xmediumSQLTechnical2021
Ans. SQL JOINs combine rows from related tables. INNER JOIN returns only matching rows, useful for required relationships. LEFT JOIN returns all left rows plus matches, useful for optional data. RIGHT JOIN is the reverse, less commonly needed. FULL OUTER JOIN returns all rows from both sides. CROSS JOIN creates every pair, often for combinations.
Q. Explain the importance of disaster recovery in databases
asked 1xmediumDBMSTechnical2023
Ans. Disaster recovery is important because it lets a database service recover after failures such as hardware loss, corruption, human error, or site outage. The key detail is having tested backups, replication, and restore procedures that meet agreed recovery time and data loss limits, so the business can continue safely.
Q. What is synchronization in Java and why is it important?
asked 1xmediumOperating systemsTechnical2019
Ans. Synchronization in Java is the mechanism that controls access to shared data by multiple threads so only one thread can execute a protected section at a time. It is important because it prevents race conditions, keeps object state consistent, and provides memory visibility guarantees so changes made by one thread are seen by others.
Q. Explain the difference between deep copy and shallow copy
asked 1xmediumPythonTechnical2021
Ans. A shallow copy creates a new outer object but reuses references to the same nested objects, while a deep copy recursively creates new copies of nested objects too. The key difference is aliasing: changing a shared nested object affects both the original and shallow copy, but not a proper deep copy.
Q. How do you plan and approach a project from start to finish?
asked 1xmediumProject planningTechnical2021
Ans. A strong answer uses a real project with clear scope, constraints and outcome. Emphasise how you clarified goals, broke work into milestones, identified risks, involved stakeholders, tracked progress and adapted when things changed. Interviewers listen for structure, ownership, communication, realistic planning and evidence that you finish work, not just start it.
Q. How do you handle conflicts within a team? Explain with scenarios
asked 1xmediumConflict resolutionHR2020
Ans. Pick a real work conflict where the stakes were meaningful but not dramatic. Emphasise listening first, separating facts from opinions, finding shared goals, and agreeing clear next steps. Show you stayed calm and respectful. Interviewers listen for ownership, emotional control, fairness, and whether the relationship and outcome both improved.
Q. Find the fastest 3 horses out of 25 using minimum number of races.
asked 1xmediumLogical reasoningTechnical2023
Ans. Use 7 races. Split 25 horses into 5 groups and race each group, giving 5 races. Race the 5 winners in race 6. The winner is fastest. Only horses that could still be second or third are: second and third from the winner’s group, first and second from the runner-up group, and first from the third-place group. Race those 5; top 2 complete the answer.
Q. How would you scale an e-commerce website for a large number of users?
asked 1xmediumScalabilityTechnical2017
Ans. I would scale it by splitting traffic across stateless application servers, caching heavily, and scaling the database read and write paths separately. The most important detail is to remove bottlenecks early: use a CDN for static content, load balancers, Redis for hot data, queues for slow tasks, read replicas, and careful database sharding when needed.
Q. How would you manage and process large volumes of data in a production system?
asked 1xmediumData managementTechnical2021
Ans. I would manage large data volumes with partitioned storage, streaming or batch pipelines, and horizontally scalable workers. The key detail is designing around back pressure and idempotency: queues buffer spikes, workers can retry safely, and data is processed in chunks with checkpoints, monitoring, and clear retention policies to control cost and reliability.
Q. Form mathematical equations from given word statements.
asked 1xeasyLogical reasoning2020
Ans. Translate each statement into symbols step by step. Assign variables to unknowns, note key words such as sum, difference, product, quotient, more than, less than, and is equal to. Preserve the order carefully, especially for “less than” and “from”. Then simplify and solve the equations, checking the answer in the original words.
Q. Solve the puzzle of mislabeled jars containing different items.
asked 1xeasyLogical reasoningTechnical2023
Ans. Draw one item from the jar labelled “mixed”. Because every label is wrong, that jar cannot be mixed, so the item tells you its true contents. If you draw an apple, it is the apple jar. The jar labelled oranges must then be mixed, and the remaining jar is oranges. Reverse the logic if you draw an orange.
Q. Identify similar images from a given set based on visual patterns.
asked 1xeasyLogical reasoningOnline test2017
Ans. Compare the images feature by feature, not as whole pictures. Check shape, size, rotation, position, shading, number of parts, line style, symmetry and added or missing elements. Eliminate images that break one rule. The similar pair or group will usually share the same pattern after allowing for rotation, reflection or scaling.
Q. Solve logical deduction problems based on given conditions and statements.
asked 1xeasyLogical reasoningOnline test2016
Ans. List the facts clearly, then translate each condition into a simple rule or exclusion. Use a table, grid, or diagram to track possibilities. Apply definite statements first, eliminate contradictions, and update the table after each step. Check remaining options against all conditions before choosing the only consistent answer.
Showing 60 of 317 questions. Ranked by how often the same question came back across interviews.