Commvault Interview Experience (On-Campus)
Commavault visited our campus for recruiting for SDE (C++/JAVA) and SDET( PYTHON) roles. If you choose the language as C++/JAVA you will be given an SDE role and for python SDET roles.
First Round: Online Coding round on their platform. The webcam is on. There were 15 MCQ and 3 coding questions. MCQ was based on OOPs mainly and one easy and two medium coding questions.
Don’t remember based on xor.
Second Round: Implementation of Virtual File System. We have to complete their code of the virtual file system. This round was 6 hrs. This whole code was to be completed in 6 hrs.
Java
import java.io.*; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; // Java class to calculate MD5 hash value class MD5 { public static String getMd5(String input) { try { // Static getInstance method is called with // hashing MD5 MessageDigest md = MessageDigest.getInstance( "MD5" ); // digest() method is called to calculate // message digest // of an input digest() return array of byte byte [] messageDigest = md.digest(input.getBytes()); // Convert byte array into signum representation BigInteger no = new BigInteger( 1 , messageDigest); // Convert message digest into hex value String hashtext = no.toString( 16 ); while (hashtext.length() < 32 ) { hashtext = "0" + hashtext; } return hashtext; } catch ( NoSuchAlgorithmException e) { // incorrect message digest algorithms throw new RuntimeException(e); } } } class CV_SIOManager { public CV_SIOManager() {} public CVFile CVGetFile( final String filePathName) // Returns the reference to the // CVFile object for the given // filePathName. { // Put your code here return null ; } public void CVDisplayStats() // Display the whole stats that // CV_SIOManager holds. { // Put your code here } public int CVDeleteFile( final String filePathName) // Deletes a file in the // given path. { // Put your code here return 0 ; } public int CVMoveFile( final String sourcePathName, final String targetPathName) // Moves file from one // location to // another. { // Put your code here return 0 ; } public int CVCopyFile( final String sourcePathName, final String targetPathName) // Copies file from one // location to // another. { // Put your code here return 0 ; } } class CVFile { private String fileName; public CVFile() { // put your code here } public CVFile( final String filePathName, final String content) // Creates a file with given content. { // Put your code here fileName = filePathName; } public void CVModifyFile( final String content) // Modifies and rewrites the content of // a file with given content. { // Put your code here } public int CVReadFile( int revision, /* output */ String content) // Reads file content based on // the given revision. { // Put your code here return 0 ; } public int CVTrim() // Trims all previous versions and // only holds on to latest content { // Put your code here return 0 ; } } /***** * NOTE ---- 1. Do not make any modifications to main(). 2. Every filePathName * given in this problem is the absolute file path with file name like * DriveName:\\Path\\To\\FileName (Eg: C:\\A.txt). *****/ public class SIOManagerDriver { public static void main(String[] args) { CV_SIOManager sm = new CV_SIOManager(); String contentInFile = "" ; CVFile fx; CVFile f1 = new CVFile( "C:\\File1.txt" , "Welcome to Commvault 1!" ); CVFile f2 = new CVFile( "C:\\File2.txt" , "All The Best 2!" ); CVFile f2_1 = new CVFile( "C:\\File2_1.txt" , "All The Best 2!" ); CVFile f9 = new CVFile( "C:\\File9.txt" , "This is File 9" ); sm.CVDisplayStats(); CVFile f4 = new CVFile( "C:\\File4.txt" , "Good Luck 4!" ); CVFile f4_1 = new CVFile( "C:\\File4_1.txt" , "Good Luck 4!" ); sm.CVDisplayStats(); CVFile f10 = new CVFile( "D:\\File10.txt" , "Good Luck 10!" ); CVFile f20 = new CVFile( "D:\\File20.txt" , "Welcome to Commvault 20!" ); CVFile f50 = new CVFile( "D:\\File50.txt" , "Best Place to Work 50!" ); CVFile f20_1 = new CVFile( "D:\\File20_1.txt" , "Welcome to Commvault 20!" ); sm.CVDisplayStats(); CVFile f60 = new CVFile( "D:\\File60.txt" , "All THE Best 60!" ); CVFile f70 = new CVFile( "D:\\File70.txt" , "All The Best 70!" ); CVFile f70_1 = new CVFile( "D:\\File70.txt" , "Commvault 70!" ); sm.CVDisplayStats(); fx = sm.CVGetFile( "D:\\File60.txt" ); if ( null != fx) { fx.CVReadFile(- 5 , contentInFile); System.out.println(contentInFile); } f4.CVModifyFile( "Welcome to Commvault 4!" ); fx = sm.CVGetFile( "C:\\File4.txt" ); if ( null != fx) { fx.CVReadFile( 0 , contentInFile); System.out.println(contentInFile); } fx = sm.CVGetFile( "C:\\File4.txt" ); if ( null != fx) { fx.CVReadFile(- 1 , contentInFile); System.out.println(contentInFile); } sm.CVDisplayStats(); sm.CVMoveFile( "C:\\File9.txt" , "D:\\File30.txt" ); sm.CVMoveFile( "C:\\File4.txt" , "D:\\File2.txt" ); sm.CVDisplayStats(); sm.CVCopyFile( "C:\\File4.txt" , "D:\\File21.txt" ); sm.CVCopyFile( "C:\\File3.txt" , "C:\\File40.txt" ); sm.CVDisplayStats(); sm.CVDeleteFile( "D:\\File20.txt" ); sm.CVDisplayStats(); sm.CVDeleteFile( "C:\\File1.txt" ); sm.CVDeleteFile( "C:\\File4.txt" ); sm.CVDisplayStats(); sm.CVDeleteFile( "D:\\File7.txt" ); sm.CVDeleteFile( "D:\\File70.txt" ); sm.CVDeleteFile( "D:\\File30.txt" ); sm.CVDisplayStats(); |
Unfortunately, no one got selected for interviews.
ALL THE BEST!
Contact Us