CommVault interview questions

159 questions from 22 interviews · updated from reports 2014-2024

Practise CommVault-style

About

Commvault is a software company that provides data protection, backup, recovery, and cyber resilience products for businesses. In India, it is commonly seen hiring Software Engineers, Software Development Engineers, and SDEs for product engineering and related technical work.

The roles that come up most are Software Engineer, Software Development Engineer and SDE. This covers 22 candidate interviews reported from 2014 to 2024. Most sat it at entry level (20 of 22 that recorded a level), with 2 internship interviews alongside. Among the 19 that recorded either route, arrivals split between campus drives (17, 89%) and off-campus applications (2, 11%). Most questions fall under DSA and CS fundamentals.

Category
Difficulty
Round

Interview questions

Q. Find the longest palindromic substring in a given string.

asked 3xmediumStringsOnline test2020-2021

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 kth smallest element in a Binary Search Tree

asked 2xmediumTreesOnline test2015-2016

Ans. Use an in-order traversal, because it visits BST nodes in sorted order, and return the node reached at count k. Implement it iteratively with a stack: go left as far as possible, pop, increment the count, then go right. Time is O(h + k), worst case O(n), and space is O(h).

Q. Find the minimum number of swaps required to rearrange a string of Cs and Ds such that no two identical characters are consecutive

asked 2xmediumStringsOnline test, Technical2019-2020

Ans. Minimum swaps is impossible if the counts of C and D differ by more than one; otherwise compare the string with the valid alternating pattern or patterns and take the smaller mismatch count divided by two. Each swap fixes two wrong positions. Count Cs and Ds, scan once for mismatches, so time is O(n).

Q. Difference between process and thread

asked 2xeasyOperating systemsTechnical2020

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. Merge two sorted linked lists into a single sorted list

asked 2xeasyLinked listsOnline test, Technical2019-2020

Ans. Use two pointers to walk through both sorted linked lists and build one sorted list by always taking the smaller current node. A dummy head node simplifies attaching nodes and returning the result. When one list ends, append the remaining part of the other. This runs in O(n + m) time and O(1) extra space.

Q. Mirror view of a binary tree

asked 1xmediumTreesTechnical2023

Ans. Mirror view of a binary tree is obtained by swapping the left and right child of every node, recursively or iteratively. Use DFS recursion, or a queue or stack to process nodes and swap their children. Each node is visited once, so time complexity is O(n) and extra space is O(h) recursively or O(n) iteratively.

Q. Longest Palindromic Substring

asked 1xmediumStringsOnline test2023

Ans. Find the longest palindromic substring by expanding around every possible centre and keeping the best range found. Each character is a centre for odd-length palindromes, and each gap is a centre for even-length palindromes. This uses only index variables, runs in O(n squared) time, and O(1) extra space.

Q. How would you test Google Drive?

asked 1xmediumSoftware testingTechnical2020

Ans. I would test Google Drive across core file operations, sharing, sync, permissions, search, version history, offline access, storage limits, and recovery. The most important detail is data integrity: uploaded, edited, synced, shared, restored, or downloaded files must remain correct and consistent across web, mobile, desktop, networks, and concurrent users.

Q. Implement the 0/1 Knapsack problem

asked 1xmediumDynamic programmingOnline test2020

Ans. Use dynamic programming where dp[c] stores the best value achievable with capacity c. For each item, iterate capacities backwards from capacity down to weight, updating dp[c] as the maximum of keeping the old value or taking the item. Backward iteration enforces 0/1 use. Time is O(nW), space is O(W).

Q. What is subnetting and subnet mask?

asked 1xmediumNetworkingTechnical2020

Ans. Subnetting is the process of dividing a larger IP network into smaller logical networks, called subnets. A subnet mask defines which part of an IP address identifies the network and which part identifies the host. The key benefit is better address management, reduced broadcast traffic, and improved network organisation and security.

Q. Print the left view of a binary tree

asked 1xmediumTreesOnline test2019

Ans. Print the first node visible at each depth when the tree is viewed from the left. Do a level order traversal using a queue, and for each level print the first node removed from the queue. This visits every node once, so the time complexity is O(n), with O(w) space for the queue.

Q. Print a random line from a given file.

asked 1xmediumFilesTechnical2020

Ans. Use reservoir sampling: scan the file line by line, keep one selected line, and replace it with the current line with probability 1 divided by its line number. This gives every line equal probability without knowing the file length. Use only one string of storage. Time complexity is O(n), space complexity is O(1).

Q. What is a deadlock in operating systems?

asked 1xmediumOperating systemsTechnical2020

Ans. Deadlock is a state where two or more processes are permanently blocked because each is waiting for a resource held by another process. The key point is that none can continue without external intervention. It typically requires mutual exclusion, hold and wait, no preemption, and circular wait to occur.

Q. Reverse a linked list in groups of size K

asked 1xmediumLinked listsTechnical2020

Ans. Reverse each block of k nodes by rewiring next pointers, then connect the previous block’s tail to the new head of the reversed block. Use three pointers to reverse a block in place, and first check that k nodes remain if partial groups should stay unchanged. Time complexity is O(n), space complexity is O(1).

Q. Explain CPU scheduling and disk scheduling.

asked 1xmediumOperating systemsTechnical2020

Ans. CPU scheduling decides which ready process gets the CPU next, while disk scheduling decides the order of pending disk I/O requests. CPU scheduling aims to improve responsiveness, throughput and fairness using policies like round robin or priority. Disk scheduling aims to reduce seek time, commonly using algorithms like SSTF, SCAN or C-SCAN.

Q. How would you debug a data recovery device?

asked 1xmediumSoftware testingTechnical2020

Ans. I would debug it methodically, starting with a known good test drive and checking power, cables, firmware, logs, and read errors before testing recovery logic. The most important detail is to keep the source media read-only, so debugging never changes or further damages the data being recovered.

Q. Explain different CPU scheduling algorithms.

asked 1xmediumOperating systemsTechnical2020

Ans. CPU scheduling algorithms decide which ready process runs next. Common ones are First Come First Served, Shortest Job First, Priority Scheduling, Round Robin, and Multilevel Queue. The key trade-off is between fairness, response time, throughput, and starvation. Preemptive algorithms can interrupt running processes, while non-preemptive ones wait until completion or blocking.

Q. Split a circular linked list into two halves

asked 1xmediumLinked listsOnline test2016

Ans. Use slow and fast pointers to find the middle, then break and relink the two halves as circular lists. Move fast two steps and slow one step until fast.next is head or fast.next.next is head. For even length, advance fast once more. Set second head to slow.next, close both circles. Time is O(n), space O(1).

Q. Swap two given nodes in a singly linked list.

asked 1xmediumLinked listsOnline test2020

Ans. Find each target node and its previous node, then relink the previous nodes and swap the two nodes’ next pointers. Handle edge cases where one node is the head, the nodes are adjacent, or either node is missing. This changes links, not data. The approach uses constant extra space and takes O(n) time.

Q. Explain how encoding works across network layers.

asked 1xmediumNetworkingTechnical2020

Ans. Encoding across network layers is a series of encapsulations where each layer represents data in the form needed by the layer below. Application data may be encoded as JSON, UTF-8, or binary; transport adds segments, network adds IP packets, link adds frames, and physical encodes bits as signals. Each layer treats higher-layer data as payload.

Q. Find the second highest income from a given table.

asked 1xmediumSQLTechnical2020

Ans. Use a subquery: take the maximum income that is less than the overall maximum income. This returns the second highest distinct income, so duplicate top salaries do not affect the result. If ties must share rank, use a ranking function such as dense rank and select rank 2.

Q. Reverse every k consecutive nodes in a linked list

asked 1xmediumLinked listsTechnical2020

Ans. Reverse the list in groups of k by first checking that k nodes exist, then reverse those links in place and connect the reversed block to the previous and next parts. Use a dummy head and pointers for group boundaries. Leave a final group smaller than k unchanged. Time is O(n), space is O(1).

Q. Reverse a linked list in alternate groups of size k.

asked 1xmediumLinked listsOnline test2020

Ans. Reverse the first k nodes, leave the next k nodes unchanged, and repeat until the list ends. Use pointer manipulation: reverse k links, connect the old head to the processed remainder, then advance k nodes without reversing. This takes O(n) time and O(1) extra space if done iteratively.

Q. Explain the internal implementation of HashMap in Java

asked 1xmediumOOPTechnical2020

Ans. Java HashMap is implemented as an array of buckets, where each bucket stores key-value entries based on the key’s hash code. The hash is spread and mapped to an index in the array. Collisions are handled by linked lists, or red-black trees when a bucket grows large. It resizes when the load factor threshold is exceeded.

Q. Differentiate between services, processes, and threads.

asked 1xmediumOperating systemsTechnical2020

Ans. A service is a long-running background program providing functionality, a process is an executing instance of a program with its own memory space, and a thread is a lightweight execution path within a process. The key difference is isolation: processes are isolated by the operating system, while threads share the same process memory.

Q. Find all substrings of a string that contain only vowels

asked 1xmediumStringsTechnical2021

Ans. Scan the string and split it into maximal contiguous runs of vowels, then generate every substring within each run. Use a set if unique substrings are required, otherwise output them directly. For a vowel run of length k, there are k(k+1)/2 substrings. Time is O(n + total output size).

Q. Find the maximum sum path from top to bottom in a matrix.

asked 1xmediumDynamic programmingOnline test2021

Ans. Use dynamic programming: store the best sum reaching each cell, then take the maximum value in the last row. Assuming moves are to the next row, down, down-left, or down-right, each cell equals its value plus the maximum valid parent from the row above. Time is O(rows × columns).

Q. Explain the Random Forest algorithm and why it works well.

asked 1xmediumMachine learningTechnical2020

Ans. Random Forest is an ensemble algorithm that trains many decision trees on different random samples of the data and combines their predictions by voting or averaging. It works well because bagging reduces variance, while random feature selection decorrelates the trees, so individual overfitting errors tend to cancel out and the final model generalises better.

Q. Explain virtual memory and thrashing in operating systems.

asked 1xmediumOperating systemsTechnical2020

Ans. Virtual memory lets a process use a large, private address space by mapping virtual addresses to physical RAM and disk storage. The operating system loads needed pages into RAM on demand. Thrashing happens when memory is overcommitted and the system spends most of its time swapping pages instead of executing processes.

Q. Find an element in a sorted rotated array in O(log N) time

asked 1xmediumBinary searchTechnical2020

Ans. Use modified binary search: compare the middle element with the left and right ends to find which half is sorted, then decide whether the target lies in that sorted half. If it does, search there; otherwise search the other half. This keeps halving the range, so time is O(log N) and space is O(1).

Q. Explain threads and their management in an operating system

asked 1xmediumOperating systemsTechnical2023

Ans. Threads are the smallest units of execution within a process, sharing the process’s memory and resources while having their own stack, registers, and program counter. The operating system manages threads by creating, scheduling, blocking, waking, and terminating them, using context switches to share CPU time while handling synchronisation to avoid races and deadlocks.

Q. Given a linked list, reverse every k nodes of the linked list

asked 1xmediumLinked listsOnline test2015

Ans. Reverse the linked list in groups of k by first checking that k nodes exist, then reversing only that block. Use a dummy head and three pointers: previous group tail, current node, and next node. After each reversal, reconnect the reversed block to the list. Leave fewer than k remaining nodes unchanged. Time is O(n), space is O(1).

Q. Solve the Fractional Knapsack problem using a greedy approach

asked 1xmediumGreedyTechnical2020

Ans. Sort items by decreasing value-to-weight ratio, then take as much as possible from each item in that order until the knapsack is full. Use an array or list of items with weight, value, and ratio. Take whole items first, then a fraction of the next item. Time complexity is O(n log n) due to sorting.

Q. Explain the difference between static and runtime polymorphism

asked 1xmediumOOPTechnical2020

Ans. Static polymorphism is resolved at compile time, while runtime polymorphism is resolved while the program is running. Static polymorphism usually uses method overloading or generics/templates, so the compiler chooses the implementation. Runtime polymorphism usually uses method overriding and dynamic dispatch, where the actual object type determines which method runs.

Q. How do you store unstructured data and which database is used?

asked 1xmediumDBMSTechnical2020

Ans. Unstructured data is usually stored in a NoSQL database, most commonly a document database such as MongoDB. Data is kept as flexible JSON-like documents rather than fixed relational tables, so each record can have different fields. For large files like images or logs, object storage may be used with metadata in the database.

Q. What is end-to-end encryption in WhatsApp and how does it work?

asked 1xmediumSecurityTechnical2020

Ans. End-to-end encryption in WhatsApp means only the sender and intended recipient can read a message, not WhatsApp or network providers. It uses the Signal Protocol: devices exchange public keys, derive shared secret session keys, encrypt messages on the sender’s phone, and decrypt them only on the recipient’s phone. Servers just relay encrypted data.

Q. Print the binary search tree in zig-zag (spiral) order traversal.

asked 1xmediumTreesOnline test2020

Ans. Print the tree level by level, alternating the direction at each level: left to right, then right to left. Use two stacks: pop from the current stack and push children into the next stack in the order needed for the next direction. The time complexity is O(n) and space is O(w), where w is maximum width.

Q. Explain concurrency control concepts through a real-world scenario

asked 1xmediumOperating systemsTechnical2023

Ans. Concurrency control is like several cashiers selling seats for the same cinema show while sharing one seating chart. Each booking must check availability, reserve the seat, and take payment as one safe transaction. Locks or optimistic checks stop two cashiers selling the same seat, while isolation keeps incomplete bookings hidden until committed.

Q. Find the maximum element between two given nodes in a binary tree.

asked 1xmediumTreesOnline test2020

Ans. Find the path between the two nodes and return the maximum value on that path. Use DFS to store the root-to-node paths for both nodes, find their last common node as the LCA, then scan both remaining path parts and the LCA. This takes O(n) time and O(h) space, or O(n) worst case.

Q. Explain multithreading and how memory sharing works between threads.

asked 1xmediumOperating systemsTechnical2024

Ans. Multithreading means running multiple threads within the same process so work can happen concurrently. Threads share the process memory, including heap objects, global variables and open resources, but each thread has its own stack and registers. Shared data must be protected with synchronisation, such as locks, to avoid races and inconsistent state.

Q. Find the minimum cost path in a matrix from top-left to bottom-right

asked 1xmediumDynamic programmingOnline test2023

Ans. Use dynamic programming where dp[i][j] is the minimum cost to reach cell i,j from the top-left. For each cell, add its matrix cost to the minimum of the valid previous cells, usually top and left. The answer is dp[m-1][n-1]. Time is O(mn), space can be O(n).

Q. Find the length of the longest palindromic substring in a given string.

asked 1xmediumStringsOnline test2021

Ans. Use centre expansion: for each index, expand while characters match to cover odd length palindromes, and also expand between adjacent indices for even length palindromes. Track the maximum length found. This uses no extra data structure beyond counters, runs in O(n squared) time, and O(1) space.

Q. Solve coding problems from Trees, Linked Lists, and Dynamic Programming.

asked 1xmediumMixedTechnical2020

Ans. Use standard patterns: DFS or BFS for trees, two pointers or reversal for linked lists, and state transition tables or memoisation for dynamic programming. The key detail is to define the invariant clearly: what each pointer, recursive call, or DP state represents. Most solutions then follow with linear or near-linear time complexity.

Q. Write all possible test cases for the WhatsApp Backup and Restore feature

asked 1xmediumSoftware testingTechnical2020

Ans. Test backup creation, scheduled backup, manual backup, restore to same or new device, full and partial media restore, encryption, account mismatch, low storage, poor network, interruption, retry, duplicate restore, corrupted backup, old app version, deleted chats, permissions, Google Drive or iCloud limits, and multi-device behaviour. Most important is data integrity after restore.

Q. How can you find the size of an integer without using the sizeof operator?

asked 1xmediumPointersTechnical2020

Ans. Create an array with two integers and compare the addresses of the two consecutive elements. Cast the addresses to character pointers before subtracting them, because a character is one byte. The difference gives the number of bytes used by an int on that system, without using the sizeof operator.

Q. Simulate the Burning House problem using a matrix and Breadth First Search.

asked 1xmediumGraphsTechnical2020

Ans. Use Breadth First Search from the initial burning cell and spread fire level by level to its valid neighbouring cells. Store cells in a queue with their time, or process by levels to count minutes. Mark visited or burned in the matrix. Check four directions only. Time is O(rows × columns), space is O(rows × columns).

Q. Explain how heaps are implemented in C++ STL and discuss related operations.

asked 1xmediumData structuresTechnical2020

Ans. C++ STL implements heaps as a binary heap stored in a contiguous random-access container, usually vector, with priority_queue as the common adaptor. By default it is a max heap, controlled by a comparator. make_heap is linear, push_heap and pop_heap are O(log n), top access is O(1), and sort_heap is O(n log n).

Q. How is multithreading achieved in Java and how do you prevent race conditions?

asked 1xmediumOperating systemsTechnical2020

Ans. Multithreading in Java is achieved by creating Thread objects, implementing Runnable or Callable, or using an ExecutorService thread pool. Race conditions are prevented by controlling access to shared mutable state, usually with synchronized blocks, locks, atomic classes, or concurrent collections. The key is to make each critical section atomic and visible across threads.

Q. Explain Computer Network layers, their functions, and socket programming basics

asked 1xmediumNetworkingTechnical2023

Ans. Computer network layers divide communication into responsibilities: physical sends bits, data link frames local delivery, network routes IP packets, transport provides TCP or UDP delivery, and application defines protocols like HTTP and DNS. Socket programming uses an IP address, port, and protocol; servers bind and listen, clients connect, then both send and receive data.

Q. Given two nodes in a Binary Search Tree, find the maximum element between them.

asked 1xmediumTreesOnline test2020

Ans. Find the lowest common ancestor of the two nodes, then compute the maximum value on the path from that ancestor to each node. The answer is the larger of those values. In a BST, the LCA is found by comparing both keys with the current node. Time complexity is O(h), where h is tree height.

Q. Find the length of the longest subarray containing consecutive integers in O(N) time

asked 1xmediumArraysTechnical2020

Ans. Use a hash set and treat each value as part of a consecutive sequence. Insert all numbers, then only start counting from a number x if x minus 1 is not present. Walk upward while x plus k exists, update the maximum length. Each value is visited at most twice, so time is O(N).

Q. Design and implement a file system structure supporting directories and files with efficient file explorer operations.

asked 1xmediumData structuresTechnical2020

Ans. Use an in-memory tree where each directory is a node with a hash map from name to child node, and files are leaf nodes storing content and metadata. Path lookup splits the path and walks the tree in O(depth). Create, delete, move, rename, list, and search operate by updating parent maps efficiently.

Q. You have 10 bags, 9 bags weigh 10 grams each and 1 bag weighs 9 grams. What is the minimum number of comparisons needed to find the lighter bag?

asked 1xmediumLogical reasoningTechnical2020

Ans. Three comparisons are needed in the worst case. Each balance comparison has three outcomes, so two comparisons can distinguish at most nine bags, not ten. Compare bags 1 to 3 with 4 to 6. If unequal, compare two from the lighter side. If equal, check 7 versus 8, then 9 versus 10 if needed.

Q. Design and implement a basic file system

asked 1xhardFile systemSystem design2020

Ans. Use an in-memory tree where each node is a directory or file, with a name, optional content, and a map of child names to nodes. Implement mkdir, ls, write, read, move and delete by splitting paths and walking the tree. Time is O(path components), plus output size for ls or read.

Q. Solve multiple hard logical puzzles during the interview.

asked 1xhardLogical reasoningTechnical2014

Ans. I solve them by clarifying assumptions, listing constraints, testing small cases, and eliminating impossibilities. I say my reasoning aloud so the interviewer can follow the structure, not just the answer. If stuck, I simplify the puzzle, look for invariants or symmetry, and state what I know, what is uncertain, and why.

Q. Design an MP3 player system to manage songs and multiple playlists using object-oriented design

asked 1xhardOops designTechnical2020

Ans. Model it with Song, Playlist, Library and Player classes, where playlists hold references to Song objects rather than copies. Library indexes songs by id and metadata, Playlist manages ordered song ids with add, remove, move and shuffle operations, and Player controls play, pause, next and previous using the active playlist and current position.

Q. Basic quantitative aptitude questions

asked 1xeasyLogical reasoningOnline test2020

Ans. Convert the words into simple equations, ratios, percentages, or units first. Identify what is given, what is required, and use the quickest standard method, such as percentage change, averages, speed equals distance by time, or profit formula. Estimate before calculating to avoid errors, then check whether the answer is reasonable.

Q. Logical aptitude questions involving basic reasoning

asked 1xeasyLogical reasoningOnline test2020

Ans. Identify the given facts, then translate them into simple conditions or relationships. Eliminate options that break any condition. For sequences, look for changes in number, position, direction, or grouping. For statements, separate what is definitely true from what is only possible. Work step by step and avoid assuming extra information.

Q. Given three jars incorrectly labeled as Oranges, Mangoes, and Mixed, determine the correct labels by picking the minimum number of fruits.

asked 1xeasyLogical reasoningHR2020

Ans. Pick one fruit from the jar labelled Mixed. Because every label is wrong, that jar cannot be mixed, so the fruit you pick identifies it. If it is an orange, label it Oranges; the jar labelled Mangoes is then Mixed, and the jar labelled Oranges is Mangoes. One pick is enough.

Q. Aptitude questions involving quantitative and logical reasoning

asked 1xunknownLogical reasoningOnline test2016

Ans. Identify what is being asked, list the given information, and choose the relevant formula or logic pattern. Convert units if needed, simplify the numbers, and solve step by step. For logical reasoning, look for relationships, sequences, exclusions, or conditions. Check the final answer against the question to avoid calculation or interpretation errors.

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

Practise a CommVault-style interview

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

Start practising

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

Common questions

What questions does CommVault ask?

Candidate interviews most often cover DSA (47%) and CS fundamentals (41%).

How many rounds does CommVault interview have?

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

Is the CommVault interview hard?

Among questions with a recorded difficulty, the mix is easy 34%, medium 54%, hard 12%.