HashedIn by Deloitte
HashedIn by Deloitte
1. Arrays
• Two Sum - #1
• Best Time to Buy and Sell Stock - #121
• Contains Duplicate - #217
• Product of Array Except Self - #238
• Maximum Subarray - #53
• Find the Duplicate Number - #287
• Merge Intervals - #56
• Insert Interval - #57
• Subarray Sum Equals K - #560
• Sort Colors - #75
• Rotate Array - #189
• Sliding Window Maximum - #239
• Koko Eating Bananas - #875
2. Strings
• Reverse String - #344
• Valid Anagram - #242
• Longest Common Prefix - #14
• Valid Parentheses - #20
• Group Anagrams - #49
• Greatest Common Divisor of Strings - #1071
• Edit Distance - #72
• Robot Return to Origin - #657
• Race Car - #818
3. Linked List
• Merge Two Sorted Lists - #21
• Reverse Linked List - #206
• Linked List Cycle - #141
• Add Two Numbers - #2
• Remove Nth Node From End of List - #19
• Copy List with Random Pointer - #138
9. Matrix
• Set Matrix Zeroes - #73
• Rotate Image - #48
• Spiral Matrix - #54
• Search a 2D Matrix - #74
Problem Statement: Rahul copies in the exam from his adjacent students.
But he doesn’t want to be caught, so he changes words keeping the letter
constant. That means he interchanges the positions of letters in words. You
are the examiner and you have to find if he has copied a certain word from
the one adjacent student who is giving the same exam, and give Rahul the
markings he deserves.
Note that: Uppercase and lowercase are the same.
Input Format:
• First line with the adjacent student’s word
• Second line with Rahul’s word
Output Format:
• 0 if not copied
• 1 if copied
• Constraints:
• 1<=Length of string<=10^6
Sample Input:
• CAR
• Acr
Sample Output:
• 1
1. Given a string s and integer k. We have to return the string having <= k
characters of the string s from the beginning.
2. Example: s="Codility We test coder" and k=14
Output: "Codility We"
3. Given Two Arrays, return the number of occurrences of the fraction that
appears most.
4. Example: a={1,2,3,4} , b={2,3,6,8}
Output => 3 as (1/2=3/6=4/8}
5. Basically in this question we were given a function of O(n^2) complexity and
our task was to make it O(n).
Interview
1. your resume in detail, database architecture design, your fav framework
in detail) HR round Basic hr discussion
2. Design the database architecture of library management system
3. DB design and query Fitment and HR round
4. questions from SQL, basic of JAVA and some higher DSA questions
5. Discuss and design a split-wise app.
6. SQL command to retrieve 3rd highest salary
7. system design and dsa
8. How will you design instagram based upon system design.