Complicato tanto da farti passare la voglia. Troppi round nessun lavoro dovrebbe avere tutti questi round. I DS e Algo hanno stancato, non sono più un must bisogna passare oltre per favore
Awful never ending kept going on this isn't real and I kept thinking what is the problem here just let me go bur under no circumstances would they let me
Interview was consist of 3 coding rounds along with G&L questions.Every round was of 45-60 minutes.The questions were very standard & tricky.If anyone qualifies in the first 2 rounds then get chance to seat in the further rounds.Interview process was was online.I was qualified for 2 rounds and both the questions were asked from file system.
Interview questions [1]
Question 1
Round 1: Approx 45 minutes
Question:
Given a URI, traverse all its subdirectories and files, and return a list of the top 10 largest files in byte, including their names and sizes. If the directories are empty, return '-1' as the result.
Input:
uri: “C:/xvcv/bfbfbb/jbhdbb”
Output:
54789565 “C:/xvcv/bfbfbb/jbhdbb/dn”
7458225 “C:/xvcv/bfbfbb/jbhdbb/dn/xvhh”
1254788 “C:/xvcv/bfbfbb/jbhdbb/jkl”
……….
112542 “C:/xvcv/bfbfbb/jbhdbb/pqr”
Hint: Use Linux Commands
Approach:
I used recursion to traverse all subdirectories within a given URI. I employed storage class commands to retrieve the size of each file and list out the child files, which I stored in a list. Then, I sorted the list and returned the top 10 largest files from it. Before traversing, I checked for edge cases to ensure robustness.
Round 2: Approx 45 minutes
Question: given a class having 3 member functions create_directory(string filepath),create_file(string filename,string filepath),bool find_filename_from given prefix(string pref,string filepath) implement these 3 member functions.
Input:
Create_directory // eg:-filepath: /abc/f/d/x/
Create_file // eg:-filepath: /abc/f/d/x/ filename:google.yaml
find_filename_from given prefix eg:-filepath: /abc/f/d/x/dsa.yaml prefix:ds