├── .gitignore
├── Adobe
└── README.md
├── AirAsia
└── README.md
├── Amazon
└── README.md
├── AmericanExpress
└── README.md
├── Atlassian
└── README.md
├── BookMyShow
└── README.md
├── Box
└── README.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DE Shaw
└── README.md
├── Expedia
└── README.md
├── Facebook
└── README.md
├── Flipkart
└── README.md
├── Google
└── README.md
├── Grab
└── README.md
├── Groupon
└── README.md
├── Intel
└── README.md
├── Intuit
└── README.md
├── JP Morgan Chase
└── README.md
├── LICENSE
├── LinkedIn
└── README.md
├── MakeMyTrip
└── README.md
├── Media.net
└── README.md
├── Microsoft
└── README.md
├── Mindtickle
└── README.md
├── MobiKwik
└── README.md
├── NEC Technologies
└── README.md
├── Netflix
└── README.md
├── Ola Cabs
└── README.md
├── Palantir
└── README.md
├── PayPal
└── README.md
├── Postmates
└── README.md
├── README.md
├── RedHat
└── README.md
├── Roblox
└── README.md
├── SAP Labs
└── README.md
├── Samsung
├── README.md
├── res
│ ├── .nofile
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ ├── 7.png
│ └── jewel.jpg
└── solution
│ └── cr1.markdown
├── Snowflake
└── README.md
├── Thoughtworks
└── Readme.md
├── Twitter
└── README.md
├── Uber
└── README.md
├── Verizon
└── README.md
├── Walmart Labs
└── README.md
├── Yatra.com
└── README.md
├── Yelp
└── README.md
├── Zomato
└── README.md
├── _config.yml
├── check.java
├── splash.png
└── thumbnail.png
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea/
--------------------------------------------------------------------------------
/Adobe/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Adobe Interview Questions
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [References](#ref)
7 | ____
8 | Coding round questions
9 | - Count set bits in an integer
10 | - Program for Binary To Decimal Conversion
11 | - Check if a given array can represent Preorder Traversal of Binary Search Tree
12 | - Sort an array of 0s, 1s and 2s
13 | - Check if a number is a Palindrome
14 | - Pascal's Triangle
15 | - Trapping Rain Water
16 | - Count Inversions in an array | Set 1 (Using Merge Sort)
17 | - Write an Efficient Function to Convert a Binary Tree into its Mirror Tree
18 | - Find the middle of a given linked list in C and Java
19 | - Merge Sort for Linked Lists
20 | - Print Right View of a Binary Tree
21 | - Reverse Level Order Traversal
22 | - Level order traversal in spiral form
23 | - Remove duplicates from a sorted linked list
24 | - K’th Smallest/Largest Element in Unsorted Array
25 | - Smallest/highest element in the left/right side (Multiple time asked)
26 | - Stock span problem
27 | - Top View of a bst
28 | - Sort an array by their frequency
29 | - Validate if a given string is numeric.
30 | Examples:
31 | "0" => true
32 | " 0.1 " => true
33 | "abc" => false
34 | "1 a" => false
35 | "2e10" => true
36 | Return 0 / 1 ( 0 for false, 1 for true ) for this problem
37 |
38 | ----
39 | Technical Interview Questions
40 |
41 | Data Structures and Algorithms
42 |
43 |
44 |
45 | - Implement LRU cache
46 | - Find the numeric value of the integer passed as a string
47 | - Search an element in an array rotated unknown number of times.
48 |
--------------------------------------------------------------------------------
/AirAsia/README.md:
--------------------------------------------------------------------------------
1 | ## AirAsia Interview Questions
2 |
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | ____
9 | Coding round questions
10 |
11 | - Given an array A, divide it into two arrays say B and C, such that the sum of elements in array B is greater than or equal to the sum of elements in array C and array B should have a minimum number of elements.
12 | - Given an array, return the number of recurring elements.
13 | - Given an array, find the Longest Increasing Subsequence (LIS).
14 | - Find the median of two sorted arrays.
15 |
16 | ----
17 | Technical Interview Questions
18 |
19 |
20 | Data Structures and Algorithms
21 |
22 | - Given an array A, arrange it in a zig-zag manner. By zig-zag manner, what is meant is that "A[0] < A[1] > A[2] < A[3] > A[4] ...."
23 | - Explain merge sort.
24 | - Explain the difference between Binary trees and AVL trees.
25 | - What data structure is used in the internal implementation of hashmaps?
26 | - You are given the stock prices of a company for the month, you can buy stocks and sell stocks on any particular day, provided the stocks are bought before they are sold. You need to do "n" such buy-sell transactions and maximize the profit.
27 | - Given an infinite sorted binary array of 0's and 1's, find the index where the first 1 is present.
28 | - Find all the permutations of a given string.
29 | - Given an array, return the index of the first non-recurring element.
30 |
31 |
32 | DBMS
33 |
34 | - Given a job table with job_id, job_start_date and job_end_date, find all the jobs that were active in the given interval of time, say from 10th August 2019 to 10th September 2019.
35 |
36 |
37 | Operating System
38 |
39 | - Explain the difference between processes and threads.
40 | - Explain different CPU scheduling algorithms.
41 |
--------------------------------------------------------------------------------
/Amazon/README.md:
--------------------------------------------------------------------------------
1 | # Amazon Interview Questions
2 |
3 | - [Coding Round Questions](#coding)
4 | - [Technical Interview Questions](#tech)
5 | - [Data Structures and Algorithms](#dsalg)
6 | - [DBMS](#dbms)
7 | - [Operating System](#os)
8 | - [System Design](#design)
9 |
10 | ---
11 |
12 | Coding round questions
13 |
14 | - Given an array of distinct elements and a number x, find if there is a pair with product equal to x.
15 | - Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing the order of input digits.
16 | - Given a number, find its corresponding Roman numeral.
17 | - Given a linked list, write a function to reverse every k nodes (where k is an input to the function).
18 | - Given phone digits, print all possible words that can be formed from them.
19 | - You are given an array of integers. Return an array of the same size where the element at each index is the product of all the elements in the original array except for the element at that index.
20 | For example, an input of [1, 2, 3, 4, 5] should return [120, 60, 40, 30, 24].
21 | You cannot use division in this problem.
22 | - Given a linked list and two integers M and N.
23 | Traverse the linked list such that you retain M nodes then delete next N nodes, continue the same till the end of the linked list.
24 | For example, an input of M = 2, N = 2 Linked List: 1->2->3->4->5->6->7->8 should return Linked List: 1->2->5->6
25 |
26 | - Given an array consisting many inner arrays, flatten the array into one:
27 | example: input: [[6,4,7,[9,5,4,[2,4,8]]],[2,2,7],[9,0,7,[9,3,1,8,5]]]
28 | output: [6,4,7,9,5,4,2,4,8,2,2,7,9,0,7,9,3,1,8,5]
29 |
30 | - Given two sorted linked lists, merge them so that the resulting linked list is also sorted.
31 | - Given a set of points find the one with the shortest distance from the origin
32 | - Reverse the bits of an 32 bit unsigned integer A.
33 | - Find if Given number is power of 2 or not.
34 | More specifically, find if given number can be expressed as 2^k where k >= 1.
35 | - Imagine that an employee tree represents the formal employee heirarchy at Amazon. Manager nodes have child nodes for each employee that reports to them; each of these employees can, in turn, have child nodes representing the number of months the employee has spent at the company. Team tenure is computed as the average tuenure of the manager and all the company employees working below the manager. The oldest team has the highest team tenure. Write an algorithm to find the manager of the team with the highest tenure. An employee must have child nodes to be a manager.
36 |
37 |
38 | - Maximize partitions such that no two substrings have any common character
39 | - Find Square Root of a whole number without using standard functions
40 | - Priority Inversion
41 | - Detect cycle in a directed graph
42 | - Recursively Reversing a linked list
43 | - Given a binary tree, print it's top view.
44 | - Find whether one binary tree is present in another binary tree.
45 | - Merge k sorted arrays.
46 | - Given a matrix where each row and each column is sorted, check whether the given number is present in the matrix.
47 | - Given a string of parenthesis like {()[{]).Check if it balanced or not.
48 | - Assembly Line Scheduling(Dynamic programming)
49 | - The Celebrity Problem
50 | - Given a string S consisting only of opening and closing parenthesis 'ie '(' and ')', find out the length of the longest valid(well-formed) parentheses substring.
51 | NOTE: Length of the smallest valid substring ( ) is 2.
52 |
53 |
54 |
55 | Technical Interview Questions
56 |
57 | Data Structures and Algorithms
58 |
59 | - There is an infinite stream of Products. Write a program to print top 10 cheapest products at any given point of time. Do it within fixed amount of memory i.e. you can't consume unknown amount of memory. (Hint: Heaps)
60 | - Given n fences, WAP to paint them with k colours such that not more than 2 consecutive fences are of same colour.
61 | - Suppose there are 2 glasses with capacities 5 litres and 3 litres. The glasses can only be completely filled or completely emptied. The water can be transferred from one glass to another, for eg. 5 ltrs glass can transfer all water to 3 ltrs glass and 2 ltrs of water will be left in 5 ltrs of glass. You cannot partially empty or fill any glass. The goal is to get 4 ltrs of water in any one glass. WAP to do this with n number of glasses with given capacities for each and the final capacity to achieve being k in any 1 glass. Print the least number of steps required to do so.
62 | - Given a large 2D array with numbers increasing as you go right or you go down. Convert this into a sorted 1D array in fixed amount of memory. (Hint: Heaps)
63 | - Given a large 1D array of 0's and 1's.Find the largest subarray which contains equal numbers of 0's and 1's. (Hint: Similar to largest subarray with zero sum)
64 |
65 |
66 | DBMS
67 |
68 | - Difference between different type of Normalisation.
69 | - Difference between SQL and NoSQL
70 | - Define the ACID properties.
71 | - What is Cursor? How to use a Cursor?
72 |
73 |
74 | Operating System
75 |
76 |
77 | System Design
78 |
79 | - Design a system that controls traffic lights with below assumptions:
80 |
81 | 1. A group of traffic lights has two components: main lights and pedestrian lights.
82 | 1. Main traffic lights have three colors: red, yellow and green.
83 | 1. Pedestrian lights have two colors: red and green.
84 | 1. Pedestrian lights' colors are reversed from main lights:
85 |
86 | - Main: red/yellow - pedestrian's: green
87 | - Main: green - pedestrian: red
88 |
89 | 1. There is a button for pedestrian lights if the button is pushed in advance, pedestrian's lights change colors according to the main ones if the button isn't pushed, pedestrian's lights remain red.
90 | 1. A typical junction has 4 groups of lights.
91 | 1. Additional question: design the system in a way that allows cars which start from one junction after a red light don't have to stop at the next one.
92 |
93 | - Design a card game by considering the following assumptions:
94 |
95 | 1. There should be more than one method of cards distribution such as even distribution, uneven distribution, etc.
96 | 1. There are multiple situations which could be considered as a winning situation:
97 |
98 | - One who finishes all his cards early.
99 | - One who earns the maximum points at the last.
100 |
101 | - Design a task management system like Trello with the following assumptions: 1. User can move tasks from one lane to the other and move it back. 2. This should have a state diagram with many end states.
102 |
103 |
104 | Miscellaneous
105 |
106 | - Design a task management system like Trello with the following assumptions:
107 | 1. User can move tasks from one lane to the other and move it back.
108 | 2. This should have a state diagram with many end states.
109 | - Design a Circular Buffer having the abilty of variable partitioning.
110 | - Describe the main features of object oriented programming.
111 |
--------------------------------------------------------------------------------
/AmericanExpress/README.md:
--------------------------------------------------------------------------------
1 |
2 | # American Express Interview Questions
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [System Design](#design)
9 | * [Miscellaneous](#misc)
10 | * [References](#ref)
11 | ____
12 | Coding round questions
13 | - Candy Love Problem
14 | - Graph Problem
15 | - XOR Sum Problem
16 | - Sherlock and Cost Problem
17 | - Merge Sort Algorithm Problems
18 | - Given a list of Students and Subjects along with credits of each, a student can select only those subjects whose credits are less than equal to his/her credits.
19 | Return the number of pairs of students and subjects.
20 | - Find LCA of a binary tree.
21 |
22 | Technical Interview Questions
23 |
24 | Data Structures and Algorithms
25 | - What is dangling pointer.
26 | - Post increment operator.
27 | - Static functions.
28 | - Sieve Algorithm.
29 |
30 |
31 | DBMS
32 | - SQL queries related to self-join and find Manager and employee in a given table.
33 |
34 |
35 |
36 | Operating System
37 |
38 |
39 |
40 | System Design
41 |
42 |
43 |
44 | Miscellaneous
45 | - 3 bulbs and 3 switches puzzle
46 | - A bee traveling between two trains puzzle
47 |
--------------------------------------------------------------------------------
/Atlassian/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Atlassian Interview Questions
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [System Design](#design)
9 | * [Miscellaneous](#misc)
10 | * [References](#ref)
11 | ____
12 | Coding round questions
13 | - Two strings are anagrams if they are permutations of each other. For example, “aaagmnrs” is an anagram of “anagrams”. Given an array of strings, remove each string that is an anagram of an earlier string, then return the remaining array in sorted order.
14 |
15 | - Given an array of n points in the plane, and the problem is to find out the closest pair of points in the array.
16 | ----
17 | Technical Interview Questions
18 |
19 | Data Structures and Algorithms
20 |
21 |
22 | DBMS
23 |
24 |
25 |
26 | Operating System
27 |
28 |
29 |
30 | System Design
31 |
32 |
33 |
34 | Miscellaneous
35 |
--------------------------------------------------------------------------------
/BookMyShow/README.md:
--------------------------------------------------------------------------------
1 | ## BookMyShow Interview Questions
2 |
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [Computer Networks](#cn)
9 | * [Miscellaneous](#misc)
10 | * [References](#ref)
11 | ____
12 | Coding round questions
13 |
14 | - Given two strings, return minimum no of modifications to convert one string into an anagram of others.
15 | - Given preorder traversal of a tree, check if it is the pre-order traversal of a BST
16 | - Given a number n, we want to reduce this number to zero. Return minimum no of operations to be performed.
17 | A particular bit of a number can be changed to zero by only one of the two operations available at a time,
18 | - if (i+1)th bit is 1 and all the bits from (i+2)th bit to the least significant bit is zero.
19 | - the least significant bit can be toggled
20 | - Given an expression string exp, write a program to examine whether the pairs and the orders of “{“,”}”,”(“,”)”,”[“,”]” are correct in exp.
21 |
22 | ----
23 | Technical Interview Questions
24 |
25 | Data Structures and Algorithms
26 |
27 | - Given an array, return the number of distinct unordered pairs from this array
28 |
29 |
30 | Operating System
31 |
32 | - What is cache invalidation? Implement LRU cache.
33 | - What are semaphores?
34 |
35 |
36 | Computer Networks
37 |
38 | - What happens when you hit www.google.com on chrome. Explained the entire flow.
39 |
40 |
41 | Miscellaneous
42 |
43 | - Questions on asynchronous Javascript.
44 | - Promises
45 | - Async/await
46 | - Is Nodejs singe-threaded?
47 | - Javascript event loop
48 | - Phone number validation along with all use cases
49 |
50 |
--------------------------------------------------------------------------------
/Box/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at rishabhmaurya.maurya@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contribution Guidelines
2 |
3 | Please make sure that your pull request adheres to the following guidelines:
4 | - For each company, make a separate pull request.
5 | - Pull requests pertaining to grammatical mistakes, removing whitespaces or renaming are highly discouraged.
6 | - The pull request and commit message should include what was added/removed.
7 | - Ensure that you don't replicate the same content.
8 | - Do not forget to mention the references in the footer section.
9 | - Given below is a general template for adding questions of a company not listed in the project.
10 | - Each article will consist of three sections:- Coding round questions, Technical Interview Questions and References.
11 | - Coding round comprises questions asked in online/paper coding round. Typically, this is the first round of interview.
12 | - Technical Interview Questions includes DS Algo, DBMS, OS and Miscellaneous sections.
13 | - Miscellaneous may include questions from design patterns, software development, system design and Object Oriented Programming.
14 | - Don't add one or two questions, just for the sake of PRs for hacktoberfest. Make quality contribution.
15 | - If there is a telephonic round, add it before coding round questions as given below.
16 |
17 | **Note:** People with major contribution will be featured in top contributors section.
18 |
19 | Happy Coding! :v:
20 |
21 | ## Sample template
22 |
23 | ## COMPANY_NAME Interview Questions
24 | * [Telephonic Round Questions](#telephonic)
25 | * [Coding Round Questions](#coding)
26 | * [Technical Interview Questions](#tech)
27 | * [Data Structures and Algorithms](#dsalg)
28 | * [DBMS](#dbms)
29 | * [Operating System](#os)
30 | * [Miscellaneous](#misc)
31 | * [References](#ref)
32 | ____
33 | Coding round questions
34 |
35 | - Questions in this section.
36 |
37 | ----
38 | Technical Interview Questions
39 |
40 | Data Structures and Algorithms
41 |
42 | - Questions in this section.
43 |
44 | DBMS
45 |
46 | - Questions in this section.
47 |
48 | Operating System
49 |
50 | - Questions in this section.
51 |
52 | Miscellaneous
53 |
54 | - Questions in this section.
55 |
--------------------------------------------------------------------------------
/DE Shaw/README.md:
--------------------------------------------------------------------------------
1 | ## DE Shaw Interview Questions
2 | * [Telephonic Round Questions](#telephonic)
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [Miscellaneous](#misc)
9 | * [References](#ref)
10 | ____
11 | Coding round questions
12 |
13 | - Replace all the spaces in a string with ‘%20’.
14 | - Find Excel column name from a given column number. Eg. 1 = A, 26 = Z, 27 = AA, 52 = AZ etc.
15 | - Find inorder successor of a node in a binary search tree with parent pointer.
16 |
17 | ----
18 | Technical Interview Questions
19 |
20 | Data Structures and Algorithms
21 |
22 |
23 | DBMS
24 |
25 | - Describe deadlock and conditions necessary for it to occur.
26 | - What is mutual exclusion and why is it required? How to acheive mutual exclusion?
27 |
28 | Operating System
29 |
30 |
31 | Miscellaneous
32 |
33 |
--------------------------------------------------------------------------------
/Expedia/README.md:
--------------------------------------------------------------------------------
1 | # Expedia Interview Questions
2 | * [Coding Round Questions](#coding)
3 | * [Technical Interview Questions](#tech)
4 | * [Data Structures and Algorithms](#dsalg)
5 | * [DBMS](#dbms)
6 | * [Operating System](#os)
7 | * [Miscellaneous](#misc)
8 | * [References](#ref)
9 | ____
10 | Coding round questions
11 | - Given a collection of intervals, merge all overlapping intervals.
12 | ```
13 | For example,
14 | Given [1,3],[2,6],[8,10],[15,18],
15 | return [1,6],[8,10],[15,18]
16 | ```
17 | - Given an input string, reverse the string word by word.
18 | ```
19 | For example,
20 | Givens = "the sky is blue",
21 | return "blue is sky the".
22 | ```
23 | - Find the maximum sum of the subarray.
24 |
25 | - We define a `k-subsequence` of an array as follows:
26 |
27 | 1) it is a subsequence of consecutive elements in the array.
28 |
29 | 2) the sum of the subsequence's elements s is evenly divisible by k`(i.e. s % k == 0)`.
30 | Given an integer and input array, find out the number of k-subsequences.
31 | Example: k=3 and array be `[1 2 3 4 1] `
32 | Output: 4 `({1 2},{1,2,3},{2,3,4},{3})`.
33 |
34 | - You are given an array with duplicates. You have to sort the array with decreasing frequency of elements. If two elements have the same frequency, sort them by their actual value in increasing order.
35 | e.g: ``[2 3 5 3 7 9 5 3 7]``
36 | Output: ``[3 3 3 5 5 7 7 2 9]``
37 |
38 | - You are given two string (like two statements). You have to remove all the words of second-string from first string and print the remaining first string. Please maintain the order of the remaining words from the first string. You will be only removing the first word, not all occurrence of a word.
39 | Example: Str1 = "A Statement is a Statement"
40 | Str2 = "Statement a"
41 | Output: "A is Statement"
42 | - You are given an integer. Print its 4th least significant bit.
43 |
44 | - Harry is trying to climb a pole. He climbs the pole in terms of hops. The height of the pole is k. Harry at a time can make a hop of:
45 | 1.) 1 unit
46 | 2.) n units
47 | Find the minimum number of hops Harry would need to reach the top of the pole.
48 |
49 | - Given two positive floating-point numbers `(x,y)`, calculate `x/y` to within a specified epsilon without using in-built functions.
50 |
51 | - Write a recursive function to generate Pascal triangle.
52 |
53 | - Write a program to move all the zeros to the beginning. Input `{1,2,3,0,0,0,4,5}` Output `{0,0,0,1,2,3,4,5}`.
54 |
55 | - Given a +ve integer, find the next highest number in the numerical order using the same numbers present in the given integer.
56 | Example : 218765
57 | Output : 251678
58 |
59 | - Implement atoi to convert a string to an integer.
60 |
61 | - There is an infinite integer grid at which N people have their houses on. They decide to unite at
62 | a common meeting place, which is someone's house.
63 | From any given cell, all 8 adjacent cells are reachable in 1 unit of time.
64 | eg: (x,y) can be reached from (x-1,y+1) in a single unit of time.
65 | Find a common meeting place which minimises the sum of the travel times of all the persons.
66 |
67 | Input Format:
68 | N
69 | The following N lines will contain two integers saying the x & y coordinate of the i-th person.
70 |
71 | Output Format:
72 | M M = min sum of all travel times;
73 | - Ashley has a bunch of coins she wants to arrange into staircases. She starts with a row of 1 coin which goes on top of a row of 2 coins, then 3 coins and so on. Each row should have exactly 1 more coin than the row above it. Determine the number of complete rows of coins in her finished staircase.
74 |
75 | For example, if she's got 6 coins, she can create a staircase with 1 coin in the top row, 2 in the second and 3 in the third. She can complete 3 rows. It would take at least 4 more coins, 10 coins total, for her to be able to create a 4th complete row.
76 |
77 | - Given an array of n integers. The problem is to find the maximum length of the subsequence with the difference between adjacent elements as either 0 or 1.
78 |
79 | Input : arr[] = {2, 5, 6, 3, 7, 6, 5, 8}
80 |
81 | Output: 5
82 |
83 | The subsequence is {5, 6, 7, 6, 5}.
84 |
85 | ----
86 | Technical Interview Questions
87 |
88 | - A server can call an API once per second. How would you ensure that it calls 1/sec given that it's a multithreaded environment? If there are multiple servers how would you ensure that the calls remain 1/sec?
89 |
90 | Miscellaneous
91 | - What is the __init__.py file in Python?
92 | - What does the double underscore represent in Python?
93 | - Puzzle: You are given 8 identical looking balls. One of them is heavier than the rest of the 7 (all the others weigh the same). You a provided with a simple mechanical balance and you are restricted to only 2 uses. Find the heavier ball.
94 |
--------------------------------------------------------------------------------
/Facebook/README.md:
--------------------------------------------------------------------------------
1 | # Facebook Interview Questions
2 | * [Telephonic Round Questions](#telephonic)
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [Miscellaneous](#misc)
9 | * [References](#ref)
10 | ____
11 | Telephonic round questions
12 |
13 | - You are given the start time and finish time of n intervals. You have to write a a function that returns boolean value indicating if there was any overlapping interval in the set of existing intervals. (Sort and check, time complexity O(nlogn)).
14 | - You have 2 sparse vectors (large number of 0’s). First tell me a way to represent and store them, and then find the dot product.
15 | (To store them, we should store the value and index of those indexes that have a non-zero value, and then finding the dot product is very straight forward).
16 | - You have an array of n elements, and a sum. Check if any 2 elements in the array sum to the given sum.
17 | - Given an array A[] of N numbers and another number x, determine whether or not there exist three elements in A[] whose sum is exactly x.
18 | - Given an array of strings, return the common prefixes, if not found return an empty array.
19 | Ex. ['abcd', 'abb', 'acd'] -> return 'a'
20 | - Given an array of ints, return the kth largest element in the array.
21 | Ex. [-3,5,0,9,4], k = 2 -> return 5
22 |
23 |
24 | ----
25 | Coding round questions
26 |
27 | - Given a string, check if it is a palindrome by ignoring spaces. E.g. race car would be a palindrome.
28 | - Given two very large strings, consisting of only digits, multiply the two strings and return the result as a string.
29 | - There are n trees in a circle. Each tree has a fruit value associated with it. A bird can sit on a tree for 0.5 sec and then he has to move to a neighbouring tree. It takes the bird 0.5 seconds to move from one tree to another. The bird gets the fruit value when she sits on a tree. We are given n and m (the number of seconds the bird has), and the fruit values of the trees. We have to maximise the total fruit value that the bird can gather. The bird can start from any tree.
30 | - You are given the encoding for a base 58 number. You have to convert all the numbers from 1 to n to a base 58 number using the encoding given.
31 |
32 |
33 | ----
34 |
35 |
36 | Technical interview questions
37 | Data Structures and Algorithms
38 |
39 | - Converting Decimal Number lying between 1 to 3999 to Roman Numerals.m
40 | - Given an array of distinct elements. The task is to find triplets in the array whose sum is zero.
41 | - Given an array with positive number the task is that we find largest subset from array that contain elements which are Fibonacci numbers.
42 | - Given a string of numbers, the task is to find the maximum value from the string, you can add a ‘+’ or ‘*’ sign between any two numbers.
43 | - Given a string that contains ternary expressions. The expressions may be nested, task is convert the given ternary expression to a binary Tree.
44 | - Given an integer array and a positive integer k, count all distinct pairs with difference equal to k.
45 | - Given a string, find out if the string is K-Palindrome or not. A K-palindrome string transforms into a palindrome on removing at most k characters from it.
46 | - Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
47 | - Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number.
48 | - Find the n’th term in Look-and-say (Or Count and Say) Sequence. The look-and-say sequence is the sequence of integers:1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, …
49 | - Given a dictionary, a method to do a lookup in the dictionary and a M x N board where every cell has one character. Find all possible words that can be formed by a sequence of adjacent characters. Note that we can move to any of 8 adjacent characters, but a word should not have multiple instances of the same cell.
50 | - Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible decodings of the given digit sequence.
51 | - Given a square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space.
52 | - Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have same width and the width is 1 unit.
53 | - Given that integers are read from a data stream. Find median of elements read so for in efficient way. For simplicity assume there are no duplicates.
54 |
55 | DBMS
56 |
57 |
58 | Operating System
59 |
60 |
61 | Miscellaneous
62 |
63 | - Design URL Shortener
64 | - Design Messenger
65 | - Design Search Typeahead
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | # Facebook Interview Questions
78 | * [Coding Round Questions](#coding)
79 | ____
80 | Coding round questions
81 |
82 | - There are N trees in a circle. Each tree has a fruit value associated with it. A bird has to sit on a tree for 0.5 sec to gather all the fruits present on the tree and then the bird can move to a neighboring tree. It takes the bird 0.5 seconds to move from one tree to another. Once all the fruits are picked from a particular tree, she can’t pick any more fruits from that tree. The maximum number of fruits she can gather is infinite.
83 | Given N and M (the total number of seconds the bird has), and the fruit values of the trees. We have to maximize the total fruit value that the bird can gather. The bird can start from any tree.
84 |
85 | - Given two numbers as stings s1 and s2 your task is to multiply them.
86 |
87 | - Find the longest increasing subsequence of a given array of integers, A.
88 | In other words, find a subsequence of array in which the subsequence’s elements are in strictly increasing order, and in which the subsequence is as long as possible.
89 | This subsequence is not necessarily contiguous, or unique.
90 | In this case, we only care about the length of the longest increasing subsequence.
91 | Sample Input: A = 1,2,1,5
92 | Sample Output: 3
93 |
94 |
95 | - A message containing letters from A-Z is being encoded to numbers using the following mapping:
96 | 'A' -> 1
97 | 'B' -> 2
98 | ...
99 | 'Z' -> 26
100 | Given an encoded message A containing digits, determine the total number of ways to decode it modulo 10^9+7.
101 |
102 |
--------------------------------------------------------------------------------
/Flipkart/README.md:
--------------------------------------------------------------------------------
1 | # Flipkart Interview Questions
2 |
3 | - [Coding Round Questions](#coding)
4 | - [Technical Interview Questions](#tech)
5 | - [Data Structures and Algorithms](#dsalg)
6 | - [DBMS](#dbms)
7 | - [Operating System](#os)
8 | - [Miscellaneous](#misc)
9 | - [References](#ref)
10 |
11 | ---
12 |
13 | Coding round questions
14 |
15 | - Paths requiring minimum number of jumps to reach end of array
16 | - Find the row having a maximum number of 1s in a binary matrix where each row is sorted.
17 | - Clone a stack without using extra space.
18 | - Design a stack with push pop and find min operations in o(1) time.
19 | - Explain external merge sorting. And try to optimize it if possible.
20 | - Given a string s1 and another string s2, what is the smallest substring in s1 that contains all the characters of s2 ? (most efficient solution)
21 | - Given two list of strings, do the following operations of each pair of strings with same index.
22 | Operation: compute the minimum no. of changes required to make them anagram(rearrange characters of the first string to make another string).
23 | ```
24 | Eg: (abc,def) = 3
25 | (abc,cde) = 2
26 | (aab,bba) = 1
27 | (aaa,bbb) = 3
28 | ```
29 |
30 | ---
31 |
32 | Technical Interview Questions
33 |
34 | Data Structures and Algorithms
35 |
36 | - Given set of words which I have to treat as dictionary as new lexicographic order. I have to learn from set of string as print lexicographic order of each character.
37 | - Generate n numbers in ascending order which are having given k factors. Discuss various approaches. Discussed on various approaches.
38 | - Simple dp question that a frog can take 1 or 2 step. Number of ways to reach nth position.
39 | - Given a string s1 from a dictionary and a string s2 from a dictionary, find the minimum number of steps to transform s1 to s2 under the following conditions:
40 | You can change the implementaion of dictionary
41 | Every transformation should belong to the dictionary
42 | You are given a O(1) library function F(s1,s2) which returns True or False for the query ‘can s2 be obtained from s1 with a single transformation’
43 | - Convert a BST to sorted doubly linked list without any extra space.
44 | - Given an array of integers, for each element find the smallest element bigger than it and is present to its right. (Expected time complexity O(nlogn)
45 | - Given a complete binary tree, such that level order traversal is sorted. Find an element K in this tree efficiently. (Obviously better than O(n))
46 | - Given an array of sorted integers(both positive and negative), you have to find the square array, which contains a square of each element of the given array in sorted order.
47 | (Expected time complexity O(n))
48 | - Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of the line i is at (i, ai) and (i, 0). Find two lines, which, together with the x-axis forms a container, such that the container contains the most water.
49 | - You are given three sorted arrays A,B,C. You have to count number of tuples (a,b,c) satisfying a>b>c. a is taken from A, b is taken from B and c is taken from C
50 | - Given NxN matrix. Each cell contains a symbol which is the direction to which you can move from that position. Like if ‘->’ then you can move the left adjacent cell, ‘<-‘ then move to the right adjacent cell and so on for moving upwards and downwards.
51 | Now you would be given start and a end point. You have to find if there is path from start to the end.
52 | - Given an integer array nums, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order.
53 | Return the shortest such subarray and output its length
54 | - Given an n-ary tree, you have to burn all the leaves first. Now, some new leaves will form so you burn them too. Repeat this process until you burn the root node. Your task is to print all the leaves which burn at a time in one line.
55 |
56 | ```
57 | Eg : 1
58 | / \
59 | 2 3
60 | / \ / \
61 | 4 5 6 7
62 | / \
63 | 8 9
64 |
65 | O/P: 8 9 5 6 7
66 | 4 3
67 | 2
68 | 1
69 | ```
70 |
71 | - Given an array of integers(both positive and negative), you have to compute the minimum value of abs(sum of all numbers)
72 | You can change the sign of any element any number of times.
73 |
74 | - Given the start and end coordinates of a knight in a chess board, return the minimum number of moves required by the knight to go from the start to the end position. (Knight's movement: move two squares vertically and one square horizontally, or two squares horizontally and one square vertically). If it is impossible to reach the end position, return -1.
75 |
76 | DBMS
77 |
78 | - what tables would you like to used for online shopping like flipkart. He asked the the primary keys for every table and foreign key if there are any.
79 | - He then asked me about mapping of these keys and what type of mapping to be used here(one to one, many to many or many to one).
80 |
81 | Operating System
82 |
83 | - Multithreading and its examples
84 |
85 |
86 | Miscellaneous
87 |
88 | - Projects and Internship
89 | - There are billions of URL given. Come up with a efficient data structure that returns ip address of these urls.
90 | - Print the boundary of a tree.
91 | - Database Mgt System
92 | - Given a large stream of strings, return the top 10 most frequently occurring string . (Hash map + min heap of size 10 is the solution.)
93 | - Trie data structure
94 |
--------------------------------------------------------------------------------
/Google/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Google Interview Questions
3 |
4 | * [Telephonic Round Questions](#quiz)
5 | * [Coding Round Questions](#coding)
6 |
7 | ____
8 |
9 |
10 | Telephonic Round Questions
11 |
12 | - What is the approximate value of 2 to the power of 24?
13 | - The average and worst-case time complexity of Merge Sort and Quick Sort.
14 | - What does the *.find()* function of C++ Collection return when the item is not there in the collection.
15 | - Mention few implementations of Map interface in Java.
16 | - What is the advantage of using Heapsort over Mergesort?
17 | - Assume you're using a program which uses dynamic memory allocation and you're working with a libary which does not have malloc function.How would you implement your own malloc function?
18 | - which data structure is used to implement DFS and which one is used for BFS?
19 | - what is the lookup time for a HashSet?
20 | - Heap is implemented using which data structure?
21 | - which sorting algorithm is best in terms of time complexity?
22 | - Immutable data structure among these: tuples, lists, dictionaries
23 | - Minimum height of the binary tree of 800 nodes?
24 | - What is the method used to cut spaces from front and back of a string in Python?
25 | ____
26 |
27 |
28 | Coding round questions
29 |
30 | - Given (x, y) coordinates, create a function such that each coordinate is uniquely mapped to an integer. Also make sure that given an integer, you should be able to find (x, y) coordinates. So F(x, y) = z and also that inverse F(z) = (x, y).
31 | - You are given an array of million numbers and provided a range of index (say left, right). For multiple queries, each with input left and right indexes, output the maximum in that range.
32 | - Given an expression tree (a tree with mathematical operations as the root and left children, and the numbers as the leaves) calculate and return the value of the whole mathematical expression.
33 | - Given an array of integers arr[], find the number of recycled pairs in the array. A recycled pair of two numbers {a, b} has the following properties :
34 |
35 | A should be smaller than B.
36 | Several digits should be the same.
37 | By rotating A any number of times in one direction, we should get B.
38 |
39 | - We have to paint n boards of length {A1, A2, .. An}. There are k painters available and each takes 1 unit time to paint 1 unit of the board. The problem is to find the minimum time to get this job done under the constraints that any painter will only paint continuous sections of boards, say board {2, 3, 4} or only board {1} or nothing but not board {2, 4, 5}.
40 | - Given a valid sentence without any spaces between the words and a dictionary of valid English words, find all possible ways to break the sentence in individual dictionary words. Sample input-output is as follows:
41 | Sample Input: {i, like, sam, sung, Samsung, mobile, ice, cream, icecream, man, go, mango}, "ilikesamsungmobile"
42 | Sample Output: I like sam sung mobile
43 | I like Samsung mobile
44 |
45 | - Given two integer arrays A and B of size N.
46 | There are N gas stations along a circular route, where the amount of gas at station i is A[i].
47 | You have a car with an unlimited gas tank and it costs B[i] of gas to travel from station i
48 | to its next station (i+1). You begin the journey with an empty tank at one of the gas stations.
49 | Return the minimum starting gas station’s index if you can travel around the circuit once, otherwise return -1.
50 | You can only travel in one direction. i to i+1, i+2, … n-1, 0, 1, 2.. Completing the circuit means starting at i and
51 | ending up at i again.
52 |
53 | - Given a string A, partition A such that every substring of the partition is a palindrome.
54 | Return the minimum cuts needed for a palindrome partitioning of A.
55 | Sample Input: "aba"
56 | Sample Output: 0
57 | - Given a map containing employee to manager mappings, find all employees under each manager who directly or indirectly reports to him.
58 | For example, consider below employee-manager pairs :
59 | Sample Input: A->A
60 | B->A
61 | C->B
62 | D->B
63 | E->D
64 | F->E
65 | Sample Output: A-> B, D, C, E, F
66 | B-> D, C, E, F
67 | C->
68 | D-> E, F
69 | E-> F
70 | F->
71 |
--------------------------------------------------------------------------------
/Grab/README.md:
--------------------------------------------------------------------------------
1 | # Grab Interview Questions
2 | * [Coding Round Questions](#coding)
3 | * [Technical Interview Questions](#tech)
4 | * [Data Structures and Algorithms](#dsalg)
5 | * [DBMS](#dbms)
6 | * [Operating System](#os)
7 | * [Miscellaneous](#misc)
8 | * [References](#ref)
9 | ____
10 | Coding round questions
11 | - In an integer array, find a pair of numbers which add up to a given number.
12 | - Write a function that add 1 to LinkedList number
13 | ```
14 | [2]->[4]->[5]->[7]->[3]->[6]
15 | after plus 1
16 | [2]->[4]->[5]->[7]->[3]->[7]
17 | ```
18 | - Find the count of all perfect squares between two numbers a and b.
19 | - Given an array of N integers, find the longest leading fragment of the array which contains equal no. of X and Y. Expected time complexity is O(n).
20 | - There're 3 kinds of the bus ticket.
21 | 1: ticket 1 cost 2 and can be used for a day.
22 | 2: ticket 2 cost 7 and can be used for a consecutive 7 days.
23 | 3: ticket 3 cost 25 can be used for a month. Assume month here means 30 consecutive days.
24 |
25 | Now there's an array filled with elements. Each element value is a date for a person to travel. This array has already been sorted in ascending order, like {1,3,4,5,11,12,23,24,30}.
26 | The final day is 30th and the first day is 1st.
27 |
28 | So for any given array from a person to travel, how can this person cost least?
29 | - Given N rows of seats in a movie theatre, each row with seats labelled A to K some seats are reserved. A 3 person family want seats next to each other (seats across the aisle is not allowed), return all available options.
30 |
31 | Reserved seat will be given like "1A 2B 40G".
32 | - Design a class to calculate the moving average of last N numbers in a stream of real numbers.
33 | - Format a string of numbers to display a currency - example" "1234.678" to "1,234.68".
34 | - Given an array find the next greater element.
35 | - Find the distance between any two nodes of the tree.
36 | - There is NPM JSON API for getting NPM packages info. For example, the following URL allows for getting information about the latest version of "forever" package:
37 | http://registry.npmjs.org/forever/latest
38 | This request will result in a JSON, containing many fields, including dependencies field:
39 | ```dependencies: {
40 | cliff: "~0.1.9",
41 | clone: "^1.0.2",
42 | colors: "~0.6.2",
43 | flatiron: "~0.4.2",
44 | forever-monitor: "~1.7.0",
45 | ...
46 | }
47 | ```
48 |
49 | This is a list of direct dependencies of an NPM package.
50 |
51 | Write a function getAllDependencies(packageName) which takes in packageName parameter as a string and returns an array of strings of both direct and all indirect (recursive) dependencies of the given package, fetched from the API described above. For example, if A depends on B, and B depends on C and D, getAllDependencies('A') should return ['B', 'C', 'D']. The result should not contain duplicates.
52 |
53 | In a correct implementation, getAllDependencies("forever") should return an array with length about 200+ (as of the time we wrote this question and might be different in the future).
54 |
55 | Include a list of tools that need to be installed to run your code and instructions on how to run your program.
56 |
57 | NOTE:
58 |
59 | 1. Don’t try to code your solution in a browser environment, the response from NPM API will not pass CORS checks in the browser.
60 | 2. You should not care about package versions (only need the latest).
61 | 3. You should not care about the development of dependencies.
62 | 4. The function should return the array (or a promise of the array if your function is async), instead of just printing the result.
63 |
64 | Base level expectations:
65 |
66 | Code correctness
67 | Code readability
68 | Error-handling: do not assume your calls to the endpoint will always succeed
69 |
70 | Bonus points for:
71 |
72 | Use of concurrency
73 | - Find the total number of heaps that could be formed with n distinct integers. It has a dynamic programming approach.
74 | - Write a program which takes JSON as input and gives prettified JSON.
75 |
76 | ----
77 | Technical Interview Questions
78 |
79 | Data Structures and Algorithms
80 | - Minimum Element in Stack.
81 | - Top view of the tree.
82 | - Flip the ith bit without using ~.
83 | - Queue using two stacks.
84 | - Right view of a binary search tree.
85 | - Find out the last nth node in a linked list.
86 | - Write code for column-wise tree traversal.
87 | - Reverse a sentence of words.
88 | - How do you check that a given binary tree is a valid balanced binary search tree?
89 | - You receive a bitstream (0 and 1). Continuously receive a stream of bit, each time, you have to determine whether the current value is divisibility by 3 and print True or False.
90 | - Given an array of unsorted positive integers, find the length of maximum subarray containing consecutive integers.
91 |
92 |
93 | DBMS
94 |
95 | - DB Concurrency.
96 |
97 | Miscellaneous
98 |
99 | - What is the use of join() and yield() in Thread?
100 | - What is a singleton class and how to protect it from reflection?
101 | - Explain JVM architecture.
102 | - What is a Stack Frame?
103 | - What are dockers and containers?
104 |
105 |
106 | ----
107 | References
108 |
109 | - Geeksforgeeks
110 |
--------------------------------------------------------------------------------
/Groupon/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Intel/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Intel Interview Questions
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [Miscellaneous](#misc)
9 | * [References](#ref)
10 | ____
11 | Coding round questions
12 | - Design a stack in which we should push and pop at both the ends (30 min)
13 | Solve the same using Linked List and Arrays.
14 | Write test case to verify your code.
15 | - Design autonomous driving car. (30 min)
16 | They were checking how deep we can think and consider all the possible use cases and scenarios
17 | - A simple code on brute force approach, Given a hotel check-in and checkOut list(of a month) containing a number of persons check-in and checkOut on each and every day, find out the days which has maximum check-in and maximum CheckOut?
18 | - Design a stack with push pop and find min operations in o(1) time.
19 | - Explain external merge sorting. And try to optimize it if possible.
20 | - Given a string s1 and another string s2, what is the smallest substring in s1 that contains all the characters of s2 ? (most efficient solution)
21 | ---
22 | Technical Interview Questions
23 |
24 | Data Structures and Algorithms
25 | - Write the most efficient algorithm to find square/square root of a number.
26 | - Write the most efficient algorithm to find if a number is prime or not.
27 | - At Bit level, how will you find if a number is a power of 2 or not.
28 | - reverse a linklist both way iterative and recursive
29 | - How would you check whether stack space is overflowed or not?
30 | - Which part of the memory is allocated, when malloc and calloc are called for any variable?
31 |
32 | DBMS
33 | - What are the major data structures used in the following areas: RDBMS, Network data model, and Hierarchical data model.
34 | - What do you mean by Correlated subquery?.
35 |
36 | Operating System
37 | - What is a semaphore? Explain in detail.
38 | - What is an interrupt. How does a processor handle an interrupt?
39 | - What is the exact role of Memory Management Unit?
40 | - they asked os concepts like scheduling, paging, segmentation, virtual memory, physical memory, cache, thread, semaphor etc.
41 | - What are cache and TLB?
42 | - How would you measure the stack space without using the task manager, when an application is running on a computer? Write an algorithm if possible
43 | - When a game is running on a computer, what are the resources it will use on a computer? Firmware, Middleware, drivers, Application characteristics, stack
44 |
45 |
46 | Miscellaneous
47 | - Projects and Internship
48 | - What do you mean by Network and Switching Subsystem?
49 | - Tell me about your M.Tech project?
50 | - Tell me about your M.Tech Mini Project?
51 | - Tell me about your recent project?
52 |
53 |
--------------------------------------------------------------------------------
/Intuit/README.md:
--------------------------------------------------------------------------------
1 | # Intuit Interview Questions
2 | * [Coding Round Questions](#coding)
3 | * [Technical Interview Questions](#tech)
4 | * [Data Structures and Algorithms](#dsalg)
5 | * [References](#ref)
6 | ____
7 | Coding round questions
8 | - You have been two integers n and m where n is the size of the array and m is the number of the edges. The next line contains an array of size n and next m lines contain two integers x and y each which represents that there exists a bidirectional edge between x and y. We have to output the number of permutations of the array which are lucky. A permutation is said to be lucky if for every Vi in the array there exists an edge between Vi and Vi+1.
9 |
10 |
11 |
12 | Eg Input : 3 2 Output : 2 ( 1-2-3 and 3-2-1)
13 |
14 | 1 2 3
15 |
16 | 1 2
17 |
18 | 2 3
19 |
20 |
21 |
22 | - You have been an integer n and an array of size n as input. You have to print the count of special numbers in an array. A number is said to be special if it is divisible by at least one other element of the array.
23 |
24 | Eg: Input: 3 Output: 2 ( 2 and 3 because they are divisible by 1)
25 |
26 | 1 2 3
27 |
28 |
29 |
30 | - You have been given an mXn matrix and an integer k as input. You have to print the count of all the submatrices of the current matrix whose sum is divisible by k.
31 |
32 | Eg Input: 2 2 2 Output: 5 ( [1,3], [2,4], [2], [4], [1,2,3,4] )
33 |
34 | 1 2
35 |
36 | 3 4
37 |
38 |
39 |
40 | - You have been given an integer n and a string of length n. You have to find the longest palindromic substring for every prefix of the given string.
41 |
42 | Eg. Input: 5 Output: 1 1 3 3 5
43 |
44 | a b a b a ( a: 1, a b: 1, a b a: 3, a b a b: 3, a b a b a: 5)
45 |
46 |
47 |
48 | ----
49 |
50 |
51 |
--------------------------------------------------------------------------------
/JP Morgan Chase/README.md:
--------------------------------------------------------------------------------
1 |
2 | # JPMC QR Interview Questions
3 |
4 | * [Telephonic Round Questions](#quiz)
5 | * [Coding Round Questions](#coding)
6 |
7 | ____
8 |
9 |
10 | Virtual Interview Round Questions
11 |
12 | * Interview Round 1
13 | - Return the kth sorted element from an unosrted array, provided that you cannot sort the complete array.
14 | Approach : Apply Quicksort, taking elements partially - each time need to check if the pivot (chosen as last element) is on the (n-k-1)th position or not.
15 | - You are given a rectangle with sides of lengths X and Y, given that X and Y are both independent random variables from the same probability distribution. You are also given a square with side length as X. Compare the expected areas of both the figures.
16 | Approach : Area of rectangle = XY => expected value = E(XY) = E(X)E(Y) = u^2 (u = mean of distribution)
17 | Area of square = X^2 => expected value = E(X^2) => apply formula of variance to get a relation and then compare.
18 | - Given an equation : sinx = 5. solve for x.
19 | Approach : Apply Euler's Formula.
20 | - Given a graph, find the minimum number of colours using which it can be coloured.
21 | Approach : Consider a adjacency matrix representation of the graph, with 1 representing edges between nodes and 0 otherwise. Applying DFS, we can color all the connected components - all the 1s should be colored. So the problem reduces to finding the number of islands of 1s. Important thing to consider - since minimum number is asked, you need to take 'adjacent' 1s in all 8 directions and not just the ones with common edge.
22 |
23 | * Interview Round 2
24 | - What is a friend function in C++?
25 | - What is the difference between references and pointers?
26 | - How to add two integers without using addition operator? (Hint : apply bit manipulation)
27 | - What is the expected value obtained upon rolling a dice?
28 | - Given a dice, what will be the expected payoff for two rolls? (Payoff means the value obtained, you can only take the value of the last roll. You may choose to stop after 1 roll if you so desire.)
29 | - Time complexities of insertion sort, selection sort, counting sort and when they should be used.
30 |
31 | * Interview Round 3
32 | - Given a sequence, determine whether it is converging or diverging.
33 | - Given two strings, tell whether they follow a similar pattern or not.
34 | example : 'abb' and 'fzz' follow a pattern, but 'abc' and 'fzz' do not. Similarly, 'abca' and 'fggf' do not.
35 | Hint : come up with a suitable hashing function.
36 | ____
37 |
38 |
39 | Coding round questions
40 |
41 | - Given a sorted array find the length of the longest Arithmetic Progression.
42 | example : 1 4 5 7 8 10 -> longest AP : 1, 4, 7, 10 => return 4.
43 |
44 | - Longest Increasing Subsequence
45 |
46 | - Aptitude Questions -> CS theory, Probability, Linear Algebra
47 |
48 | - Given an int, print 1 if the number of occurrences of current index and element at this index is same, else print 0
49 | Ex. 22 -> 0
50 | Ex. 2020 -> 1, because 0: there are 2 zeroes, 1: there is 0 ones, 2: there are 2 twos, 3: there is 0 threes
51 |
52 | - Given a string of shuffled numbers (in the string form), print the corresponding integer in a sorted way
53 | Ex. neo -> 1
54 | Ex. rneheetotow -> 123
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Rishabh Maurya
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/LinkedIn/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # LinkedIn Interview Questions
4 | * [Coding Round Questions](#coding)
5 | * [Technical Interview Questions](#tech)
6 | * [Data Structures And Algorithms](#dsalg)
7 | * [Miscellaneous](#misc)
8 |
9 | ____
10 | Coding round questions
11 |
12 | * Given a binary search tree and a key, if key is found in tree, return 1 else -1.
13 |
14 | * Given a string, find the number of distinct substrings (should optimise time and space complexity)
15 |
16 | * Given a string, find the number of distinct palindromic substrings (should optimise time complexity)
17 |
18 | ____
19 | Technical Interview Questions
20 |
21 | Data Structures and Algorithms
22 | * Given a boolean expression, find the number of ways to parenthesise it so that it evaluates to true.
23 |
24 | * Optimal Strategy for a Game.
25 | (You are given an array A of size N. The array contains integers and is of even length. The elements of the array represent N coin of values V1, V2, ....Vn. You play against an opponent in an alternating way. In each turn, a player selects either the first or last coin from the row, removes it from the row permanently, and receives the value of the coin.
26 | You need to determine the maximum possible amouint of money you can win if you go first.)
27 |
28 | * Given n stairs , you climb 1 , 2 or 3 stairs at a time . Find the number of ways to reach the nth step.
29 |
30 | * Given the pointer to the root of the tree and two values val1 and val2 . Find the length of path between the values val1 and val2 in the binary tree. { handle corner cases where both the values are on the same path}
31 |
32 | * Given a mapping between numbers and alphabets. find the number of ways to decode a sequence of numbers
33 |
34 | * Given a matrix of 0 s and 1 s Find the number of connected components having 1s
35 |
36 | * Given a tree check if it is a binary search tree or not constraints: space complexity O(1)
37 |
38 | Miscellaneous
39 | * Asked questions on my resume and challenges faced in my project. Other behavioral question.
40 |
--------------------------------------------------------------------------------
/MakeMyTrip/README.md:
--------------------------------------------------------------------------------
1 | ## MakeMyTrip Interview Questions
2 | * [Telephonic Round Questions](#telephonic)
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [Miscellaneous](#misc)
9 | * [References](#ref)
10 | ____
11 | Coding round questions
12 |
13 | - Given an Array of integers and an integer K and indexes L and R. You have to find an element that is most repeated in between L and R when array is repeated k-1 times.
14 |
15 | - Given a pair of coordinates (X1, Y1)(source) and (X2, Y2)(destination), the task is to check if it is possible to reach the destination form the source by the following movements from any cell (X, Y):
16 |
17 | (X + Y, Y)
18 | (X, Y + X)
19 | Note: All coordinates are positive and can be as large as 1018.
20 |
21 | - Given a list of string url's, sort them according to their count and when two strings have same count sort them lexicographically.
22 |
23 | - You are given an array of numbers and for each ith element in the array you have to calculate the absolute difference between the count of numbers that are to the left of i and are greater than ith element, and the count of numbers that are to the right of i and are lesser than ith element?
24 |
25 | - Given a String S1 and String S2. Convert string S1 to a palindrome string such as S2 is a substring of that palindromic string. The only operation allowed on S1 is the replacement of any character with any other character. Find the minimum number of operations required.
26 |
27 | - You are given a tree with N nodes and Q queries. Next line contains N integers representing the color associated with each ith node. For each query you are given a node numbers. Now you have to mark all nodes as special which are in its subtree and have the same color as this node.Once a node is marked special, it remains special in the subsequent queries. So for each query you have to output the number of special nodes in the tree.
28 |
29 | ----
30 | Technical Interview Questions
31 |
32 | Data Structures and Algorithms
33 |
34 | - Find the Longest palindromic substring in the given string.
35 |
36 | - Given a matrix of dimension m*n where each cell in the matrix can have the value 0 which represents empty cell, 1 which represents cells have fresh oranges and 2 which represents cells have rotten oranges.Determine minimum time required so that all oranges become rotten. A rotten orange at index (i, j) can rot fresh oranges at (i-1, j), (i+1, j), (i, j-1), (i, j+1).
37 |
38 | - Connect nodes at the same level of a binary tree given extra next pointer.
39 |
40 | - To design a data structure for a question bank. Each question has an ID and a text, both strings. The data structure should support insertion, deletion, search, and get random question with O(1) time complexity.
41 |
42 | - Next greater element for every element in an array.
43 |
44 | - Left view of a binary tree.
45 |
46 |
47 | DBMS
48 |
49 | - Differences between B TREES and B+ TREES.
50 |
51 | - Difference between RDMS and NoSQL.
52 |
53 | - Difference between Thread and Process.
54 |
55 | - 16 GB RAM, 256 GB Hard Disk and there are two csv files such as one is a customer file of 100MB having (customer ID, customer name) and other is a order file of 200GB having (order ID, customer ID and some order related details). Task is to inner join those two files based on customer ID with using SQL.
56 |
57 | - Difference between primary and foreign keys.
58 |
59 |
60 | Operating System
61 |
62 | - Questions in this section.
63 |
64 | Miscellaneous
65 |
66 | - What happens when you type the URL in your browser?
67 |
--------------------------------------------------------------------------------
/Media.net/README.md:
--------------------------------------------------------------------------------
1 | # Media.net Interview Questions
2 |
3 | Coding round questions
4 |
5 | - Given the list of money you either gave or took from your friends. Find the name of friend whom you have to pay max amount. If you have taken money then value will be positive or if you have given money value will be negative. If more than 1 friend have max amount then print the name of friend who achieved equal to or more than max amount the earliest. (this is available on GeeksForGeeks)
6 |
7 | - You are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerary in order and return it. All of the tickets belong to a man who departs from "JFK", thus, the itinerary must begin with "JFK". If there are multiple valid itineraries, you should return the itinerary that has the smallest lexical order when read as a single string.
8 | For example, the itinerary ["JFK", "LGA"] has a smaller lexical order than ["JFK", "LGB"].
9 | You may assume all tickets form at least one valid itinerary. You must use all the tickets once and only once. (this is available on LeetCode)
10 |
11 |
12 | - There are many people who believe that the earth is flat and NASA is a scam. They call themselves Flat Earthers. They were already worried that the 6 feet social distancing rule might push some people out of the earth. Now, they decided to think about a new issue. Since the earth is flat ( or so they think), let's imagine it as an infinite 2D grid. They have the coordinates of certain points which are orange zones and have some COVID-19 cases reported. Now each day the orange zones become more fatal. After d days, all the locations within a euclidean distance of d of a particular orange zone can be affected by this zone.
13 | They know N orange zones, each of whose coordinates are given by (A[i][0], A[i][1]). Now, a location is considered a red zone if it is affected by at least B orange zones. You need to find the first day at which the first red zone is reported. (this is available on InterviewBit)
--------------------------------------------------------------------------------
/Microsoft/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Microsoft Interview Questions
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [System Design](#design)
9 | * [Miscellaneous](#misc)
10 | * [References](#ref)
11 |
12 | ____
13 | Coding round questions
14 |
15 | - Write a program to check if a binary tree is BST or not.
16 | - Write a program to reverse digits of an integer.
17 | - Write a function that calculates the day of the week for any particular date in the past or future.
18 | - Given a binary tree and data value of a node. The task is to find the sum of cousin nodes of a given node. If the given node has no cousins then return -1.
19 | -Given a positive number N. The task is to round N to the nearest multiple of 10. The number can be so big and can contain 1000 of digits.
20 | - At an ATM Machine, you are given an amount to withdraw and some denominations of the Notes available in the ATM Machine. Find the number of ways in which you can withdraw the amount.
21 | - You are given 2 Linked List where each List represents a number, i.e if the linked list of length 3 is represented as 2->4->1 then it represents the number 241. You need to implement a function that computes the sum of these 2 numbers(represented as a linked list) and the resultant number should also be represented as a linked list.
22 | - Implement a function that accepts two integers arrays 'arr1' and 'arr2' of sizes n and m respectively as its argument to find and return the sum of all uncommon elements in two arrays(elements which are present in only one of the array). Return -1 if both arrays are null. If one of the arrays is null then return the sum of all elements of the other array.
23 | - A function accepts 2 int arrays - value array 'valarr' and index array 'indexarr', both of length 'l', as its arguments. Implement the function to permute the given value array according to the index array provided. Return the modified value array from the function.
24 | - Given a string of consecutive digits and a number Y, the task is to find the number of minimum sets such that every set follows the below rule:
25 | 1. Set should contain consecutive numbers
26 | 1. No digit can be used more than once.
27 | 1. The number in the set should not be more than Y.
28 | - Given two numbers n,m find a number closest to n and divisible by m.
29 | - Given a string consisting of only 0,1,A,B,C where A=AND B=OR and C=
30 | XOR. Calculate the value of the string moving from left to right assuming no order of precedence.
31 | - Find length of longest AP in given set of numbers.
32 | - Reverse words in a given string
33 | - Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only O(1) extra space can be used.
34 | - Given an array. Values of the array are memory sizes and the memory that is required by the system can only be represented in powers of 2. Return the size of the memory required by the system. Eg: – arr = {2,1,4,5} ,Total = 12. So, memory required =16.
35 | - Given two strings, modify 1st string such that all the common characters of the two strings are removed and the uncommon characters of the 2nd string are concatenated with uncommon characters of the 1st string. Eg: String 1 - 'aacdb' , String 2 – 'gafd' & Output – cbgf.
36 | - Given a linked list, segregate its even and odd position nodes in such a way that odd position nodes before even positioned nodes and even positioned nodes are appended after odd positioned nodes but in a reverse order. Eg: linked list: – 1 -> 2 -> 3 -> 4 -> 5 -> 6 , Output: – 1 -> 3-> 5 -> 6 -> 4-> 2.
37 | - Given a JSON string find the max depth of the string.
38 | - Given n dice and each face has value from 1 to x. Calculate the number of ways a value SUM can be obtained by rolling those dice.
39 | - Evaluate an infix expression in one pass without converting to postfix notation.
40 |
41 |
42 | ----
43 | Technical Interview Questions
44 |
45 |
46 | Data Structures and Algorithms
47 |
48 | - Given two expressions in the form of a tree. Where each node is either a token or an operator. Check if the given expressions are same. Tokens can not be compared i.e their value in not defined. And the operator behaves similar to addition having properties like commutative and associative.
49 | - Design a data structure similar to dictionary.
50 | - Given N rectangles in a 2-D and the (x, y) coordinates of the bottom left corner of each rectangle and height and width of each rectangle. Return (x, y) coordinates of the bottom left corner of overlapping rectangle and also give its height and width.
51 | - N flight tickets are given, create the route using these pairs of points from source to the destination.
52 | - N elements are given and N is very large. Print the smallest element.
53 | - Given a rectangle of size AxB, find minimum number of squares that could be formed from that particular rectangle.
54 | - Implement queue (class) and implement Enqueue and Dequeue functions in the class. Make the class thread safe. If this queue is used by N machines and each machine has its own view of the queue, how will you maintain the consistency.
55 | - Boundary Traversal of binary tree to print only alternate nodes.
56 | - Given a number n, find the minimum number of squares that sum to X. A number can always be represented as a sum of squares of other numbers.
57 | - Given an n x n matrix, where every row and column is sorted in increasing order. Given a key, how to decide whether this key is in the matrix.
58 | - Given, a sorted array pivoted (rotated by some number) at some point, find the position of a given element.
59 | - Given, an array of integers what will be the maximum OR value? Find the smallest subset that gives the maximum OR value?
60 | - Given a BST, find the distance between 2 nodes whose values are given.
61 | - How will you delete a node in a doubly-linked list?
62 | - Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack.
63 | - Implement a DS that supports 3 operations.
64 | 1. Insert
65 | 2. Delete
66 | 3. Get Random Element (Return a uniformly random element from the set of elements)
67 | It is guaranteed that the elements are unique. Implement the DS such that it supports all these operations in O(1) time.
68 | - Given a matrix find a submatrix with the maximum sum.
69 | - Given a row-wise and column-wise sorted matrix find a given element.
70 | - Find the lowest common ancestor of a binary tree which has links to its parents.
71 | - Partition an array into two disjoit subsets so that they have minimum absolute difference of their sums.
72 | - Calculate Height of a Binary Tree.
73 | - Given an un-directed graph, find if the graph contains any cycle.
74 | - Find if an array is subset of another array.
75 | - Suggest DS for text prediction and spell check. Follow up to this were -
76 | 1. Write the implementation of Trie.
77 | 2. How can you reduce the space complexity of Trie?
78 |
79 |
80 | DBMS
81 |
82 | - Difference between Vertical and Horizontal Scaling.
83 | - Sharding
84 | - Indexing in DBMS.
85 | - Joins in DBMS
86 |
87 | Operating System
88 |
89 | - Deadlock in OS
90 | - Difference between Process and thread
91 | - Thrashing in OS
92 | - Difference between virtual addressing and translation lookaside buffer(TLB)
93 | - As a developer how would you make your programs knowing the fact that the system implements paging.
94 | - How is deadlock created?
95 | - Talk about Semaphores and Critical Section.
96 | - Different types of Job Scheduling algorithms? What is starvation?
97 |
98 |
99 | System Design
100 |
101 | - How is a URL shortened?
102 | - Define the LRU cache and what data structure would you use to implement it?
103 | - Questions based on locked transactions in the banking sector. What will happen if 2 transactions are being made from the same account exactly at the same time? What are the different checks made by the bank to keep a check on frauds?
104 | - Design an elevator system
105 | - Design a service or tool that monitor the number of requests per a window time a service agrees to allow. If the number of request exceeds the rate limiter blocks all the excess calls.
106 | - Design a Restaurant Management System.
107 | - You are in charge of writing a software for a slot machine. On press of a button, the slot machine should output the roll of 2 dice. Constraints: Do not use the random library and secondly the probability of the dice rolls should be equal.
108 | - Design a T9 Keypad predictor. i.e, you just write the numbers and it shows at most 5 suggestions of words that can be formed , or words having this as a prefix.
109 | - Design 'Ride Now' feature in Ola Ride App.
110 | - Low level design of employee-manager "out-of-office" status provider that returns details of an employee if working on a given day otherwise keep going up the heirarchy of their managers until one is available.
111 | - Design camera class present in smartphones in such a way that multiple instances of that object are not created everytime camera is accessed.
112 | - Design a class that returns correct payment object when one of different types of payment methods (credit card, debit card, netbanking, UPI...etc) is given as input.
113 |
114 |
115 | Miscellaneous
116 |
117 | - Projects and Internship
118 | - Challenges faced in the college life
119 | - Extra-curricular activities
120 | - Given two very big numbers (each more than 500 digits), multiply them.
121 | - Three Qualities why we should hire you?
122 |
123 |
124 | ----
125 | References
126 |
127 | - [Geeksforgeeks](http://www.geeksforgeeks.org/)
128 | - [Leetcode](https://leetcode.com/)
129 |
130 |
--------------------------------------------------------------------------------
/Mindtickle/README.md:
--------------------------------------------------------------------------------
1 | # Mindtickle Interview Questions
2 |
3 | - [Coding Round Questions](#coding)
4 | - [Technical Interview Questions](#tech)
5 | - [Low Level Design](#lld)
6 |
7 | ---
8 |
9 | Coding round questions
10 |
11 |
12 | -Rotten Tomatoes in a 2d matrix. (Hint : Use BFS)
13 |
14 |
15 |
16 | Technical Interview Questions
17 |
18 | Data Structures and Algorithms
19 |
20 | -Shortest Path in a grid. (Hint : Use BFS)
21 | -Trapping Rain Water without two pointer approach. (Hint : Use stacks)
22 |
23 |
24 | Low Level Design
25 |
26 | - Design Ludo game. (Must Have : Essential Class seperation, Good Method signature and Class wise roles) {SOLID Principle}
27 | - Design Chess game. Implement the logic for Knight movement. Track Old Moves for statergy pattern. {SOLID Principle}
28 |
29 |
--------------------------------------------------------------------------------
/MobiKwik/README.md:
--------------------------------------------------------------------------------
1 | # Mobikwik Interview Questions
2 | * [Coding Round Questions](#coding)
3 | * [Technical Interview Questions](#tech)
4 | * [Data Structures and Algorithms](#dsalg)
5 | * [DBMS](#dbms)
6 | * [Operating System](#os)
7 | * [Miscellaneous](#misc)
8 | * [References](#ref)
9 | ____
10 | Coding round questions
11 | - Given an array of distinct elements, rearrange the elements of an array in zig-zag fashion in O(n) time. The converted array should be in form a < b > c < d > e < f.
12 | - Find k max in an array and print it.
13 | - Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces.
14 | - You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount.
15 | - Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
16 | - Convert string to palindrome string with minimum insertions.
17 | - Given a matrix of n*n. Each cell contain 0, 1, -1. 0 denotes there is no diamond but there is a path. 1 denotes there is a diamond at that location with a path -1 denotes that the path is blocked. Now you have started from 0,0 and reach to the last cell & then return to 0,0 collecting maximum no of diamonds. While going to the last cell you can move only right and down. While returning you can move only left and up.
18 | - Build a super stack.
19 |
20 | Print value of "peak" after each operation.
21 | n: the number of operations
22 | POP: get the value of "peak", if there is no more value after the pop,
23 | then print "EMPTY".
24 | PUSH d: put the new value(d) after "peak", then print the value of "peak".
25 | INC x d : add the new value(d) from index 0 to x elements, then print
26 | the value of "peak".
27 | - Given a graph of connected and unconnected cities and cost for connecting unconnected cities were provided and we were asked to find minimum cost to connect all cities.
28 | ----
29 | Technical Interview Questions
30 |
31 | Data Structures and Algorithms
32 | - Given a binary tree, print its top, bottom left and right view.
33 | - Implement queue with two stacks.
34 | - Level order traversal.
35 | - Find the LCA of two nodes in BST.
36 | - Find successor and predecessor of a node in BST.
37 | - Write a program for solving the Tower of Hanoi problem.
38 | - Write a program for string reversal through recursion.
39 | - WAP to reverse Doubly LL.
40 | - From a given string find the maximum length substring which is a palindrome.
41 | - Kruskal's MST algorithm.
42 | - Dijkstra's Algorithm.
43 | - Write codes for Heap sort, Radix sort and Merge sort.
44 | - Find whether the linked list has a loop or not.
45 | - Find the meeting point of the loop in a linked list.
46 | - Reverse a linked list by recursion.
47 | - Reverse a stack without using extra memory.
48 | - Make a balanced BST from the given sorted linked list.
49 | - Given a string, find the maximum substring having an equal number of 1's an equal number of 0's.
50 | - Find the total number of ways in which 2 x N strip can be filled with 2 x 1 brick. ( O(log n)).
51 | - Find the elements having the sum equal to k from BST in O(n) time complexity.
52 | - Find the maximum square submatrix from a given matrix filled with only '1'.
53 | - Find 35/3 without using recursion.
54 |
55 | DBMS
56 | - Make a normalised database of Student Database in college, right from ER to normalized relational database.
57 | - The foreign key, primary key and the entity types.
58 | - Indexing, clustering and joins.
59 | - Write a query for the maximum number.
60 | - Difference between the “having by” and “group by”?
61 |
62 |
63 | Miscellaneous
64 | - Principle of OOPS.
65 | - Multithreading in Java.
66 | - What is serialization?
67 | - Briefly explain DNS, TCP, UDP, OSI layer.
68 | - Why there is some null interface in java? What does it mean? Give me some null interfaces in JAVA?
69 | - What is JNI?
70 | - What is a compilation unit?
71 | - Is string a wrapper class?
72 | - Why Java is not 100 objects oriented language?
73 | - What is a resource bundle?
74 | - Is Iterator a Class or Interface? What is its use?
75 | - Why do threads block on I/O?
76 | - What is synchronization and why is it important?
77 | - How class level lock is acquired?
78 | - Is null is a keyword in Java?
79 | - What is checked and unchecked exceptions?
80 | - Does garbage collection guarantee that a program will not run out of memory?
81 | - What restrictions are placed on the location of a package statement within a source code file?
82 | - What is the immediate superclass of the Applet class?
83 | - What is the size of an empty class in C++ and Java? Why is it not zero? sizeof(); returns 1 in the case of C++.
84 | - Explain compile time polymorphism and runtime polymorphism.
85 | - What is the reason for single inheritance in Java?
86 | - What is the reason for single inheritance in Java ?
87 | - How to compute 33/5 without using ‘/’, ‘%’ and ‘*’ operator.
88 |
--------------------------------------------------------------------------------
/NEC Technologies/README.md:
--------------------------------------------------------------------------------
1 | # NEC Technologies Interview Questions
2 | #### Profile: Member of Technical Staff
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [Miscellaneous](#misc)
9 | * [References](#ref)
10 | ____
11 | Coding round questions
12 | - Display all numbers between 32-62 which ends with 5.
13 | - Write a program that accepts a decimal number and outputs the binary representation of that number.
14 | - Given ASCII values, output the string.
15 | - You are given an m x n 2D matrix. Rotate the image by 90 degrees (anti-clockwise).
16 | - Write a program to convert infix to postfix.
17 | - Write a program to print transpose of a given matrix.
18 | - Given a 2D array, find the maximum sum subarray in it.
19 | - Given a binary search tree, write a function kth smallest to find the kth smallest element in it.
20 | - Given a text file, I want the words to be scanned from it, along with their occurrences, sort them in descending order, & display the top 10 words.
21 | - Find the second-largest number.
22 | - Find whether two strings are an anagram of each other.
23 | - Find missing number unsorted contiguous array.
24 | - Find Number of common Guests in all parties if the user gives the input in the following format.
25 | The guest's list for parties is in one line separated by Comma(,).
26 | ```
27 |
28 | Input: 122,444,2223,122,1111,122,2233,123,333,333,444,
29 | 1111,122
30 | Output:
31 | 2233:1
32 | 2223:1
33 | 333:2
34 | 444:2
35 | 1111:2
36 | 122:4
37 | 123:1
38 |
39 | ```
40 |
41 |
42 |
43 | ----
44 | Technical Interview Questions
45 |
46 | Data Structures and Algorithms
47 | - Write a recursive function to print reverse of a Linked List.
48 | - Write a program in C/C++ to sort an Array in O(n).
49 | - WAP to reverse a linked list.
50 | - Implement queue.
51 | - What are the advantages of a doubly linked list?
52 | - Various types of Hashing-Linear, Quadratic and Mid-Square.
53 | - Decimal to Binary program using recursion.
54 | - Find the largest Number of Array using recursion.
55 | - WAP to sort a Linked List.
56 | - Program for converting Little to Big Endian.
57 | - Find the centre element of a linked list?
58 | - Print left the view of Binary Search Tree.
59 | - Implement a circular linked list.
60 | - Write a program on palindrome linked list and stack implementation using a linked list.
61 | - Program to remove duplicates from the linked list.
62 | - Program to detect if there is any loop in the linked list.
63 | - Write a program for a maximum of 4 numbers in good readable, optimized code.
64 |
65 |
66 | DBMS
67 |
68 | - Database design using Normalization.
69 | - What are DBMS, RDBMS and ORDBMS?
70 | - What is DDL, DML and DCL?
71 | - What has clustered indexing?
72 | - Transaction and normalisation.
73 |
74 |
75 |
76 | Operating System
77 |
78 | - Define Semaphores, Fragmentation, Normalization?
79 | - Discuss Deadlock, Cyclic wait.
80 | - Paging and segmentation.
81 | - What is thrashing?
82 | - What is the difference between a mutex and binary semaphore?
83 | - Can you name some IPC(Inter-process communication) mechanism?
84 |
85 |
86 |
87 | Miscellaneous
88 |
89 | - How to implement a class in C?
90 | - Difference between C and C++.
91 | - What is a template?
92 | - Elaborate upon the fact of inheritance in C structures.
93 | - How can you make the same variable accessible to two C programs?
94 | - Define Synchronization, Desynchronization, Interim, Manipulation(Java).
95 | - Name the technologies to store Sequential Files.
96 | - Difference between exe and dll.
97 | - Discussion about Volatile(in C).
98 | - Difference between const, const pointer, const to pointer(in C).
99 | - What is a virtual function in C++? What is a pure virtual function?
100 | - What is dual-core, cache m/m, the throughput of processors?
101 | - Abstract class and Interface in Java.
102 | - What is the difference between virtual and static class?
103 | - Differentiate between Call by value, call by address, call by reference.
104 | - Implement operator overloading in C++?
105 |
106 |
107 | ## Feel free to show your love :heart: by putting a star :star: on this project :v: .
108 |
--------------------------------------------------------------------------------
/Netflix/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Netflix Interview Questions
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [DBMS](#dbms)
7 | * [Operating System](#os)
8 | * [System Design](#design)
9 |
10 |
11 | Coding round questions
12 | - Write a contains() function in JavaScript
13 | - Enhance the contains function to make it part of the JavaScript system(e.g. HTMLElement.prototype)
14 | - How do you find the union and intersection of two lists assuming millions of values?
15 | - How do you optimize the solution?
16 | - Write code to implement a singleton.
17 |
18 | ---
19 | Technical Interview Questions
20 | - What is a singleton?
21 |
22 | Data Structures and Algorithms
23 |
24 | - There are 10000 servers and need to send a file of size 1MB to each server, starting from a laptop. There is only 1 MB of bandwidth between each server. What's the shortest time possible to send this file to all the servers?
25 |
26 |
27 | DBMS
28 |
29 |
30 |
31 | Operating System
32 |
33 |
34 |
35 | System Design
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Ola Cabs/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Ola Cabs Interview Questions
3 | * [Coding Round Questions](#coding)
4 | * [Technical Interview Questions](#tech)
5 | * [Data Structures and Algorithms](#dsalg)
6 | * [References](#ref)
7 | ____
8 | Coding round questions
9 | - There are two kinds of bots A and B in a 1-D array. ‘A’ bot can only move left while ‘B’ can only move right. There are also empty spaces in between represented by ‘#’. But it’s also given that the bots cannot cross over each other. Given the initial state and another state, we should tell if the transformation is possible.
10 |
11 | Sample Input-
12 | 2
13 |
14 | `#B#A# ##BA#`
15 | `#B#A# #A#B#`
16 |
17 | Sample output-
18 | Yes
19 | No
20 |
21 | - This was a simple one. Find the longest subarray in an array where the first element of the subarray is greater than the last element. The entire array shouldnt be taken as a subarray.
22 |
23 | Sample Input-
24 |
25 | 1
26 |
27 | 5 4 3 2 1
28 |
29 | Sample output –
30 |
31 | 5 4 3 2
32 |
33 | ----
34 | Technical Interview Questions
35 |
36 | Data Structures and Algorithms
37 |
38 | # Ola Cabs Interview Questions
39 | * [Coding Round Questions](#coding)
40 | * [Technical Interview Questions](#tech)
41 | * [Data Structures and Algorithms](#dsalg)
42 | * [References](#ref)
43 | ____
44 | Coding round questions
45 | - There are two kinds of bots A and B in a 1-D array. ‘A’ bot can only move left while ‘B’ can only move right. There are also empty spaces in between represented by ‘#’. But it’s also given that the bots cannot cross over each other. Given the initial state and another state, we should tell if the transformation is possible.
46 |
47 | Sample Input-
48 | 2
49 |
50 | `#B#A# ##BA#`
51 | `#B#A# #A#B#`
52 |
53 | Sample output-
54 | Yes
55 | No
56 |
57 | - This was a simple one. Find the longest subarray in an array where the first element of the subarray is greater than the last element. The entire array shouldn't be taken as a subarray.
58 |
59 | Sample Input-
60 |
61 | 1
62 |
63 | 5 4 3 2 1
64 |
65 | Sample output –
66 |
67 | 5 4 3 2
68 |
69 | ----
70 | Technical Interview Questions
71 |
72 | Data Structures and Algorithms
73 |
74 | - Given a string, how many minimum rotations are needed to get back the same string. At least one rotation needs to be done
75 |
76 | Sample Input-
77 |
78 | 2
79 |
80 | abc
81 |
82 | abab
83 |
84 | Sample Output-
85 |
86 | 3
87 |
88 | 2
89 |
90 |
91 | - Find the distance between two nodes in a binary tree.
92 |
93 |
94 |
95 | Reference
96 | https://www.geeksforgeeks.org/ola-interview-experience-set-15-1-year-experienced-for-sde1/
97 |
98 |
99 | - Given a string, how many minimum rotations are needed to get back the same string. Atleast one rotation needs to be done
100 |
101 | Sample Input-
102 |
103 | 2
104 |
105 | abc
106 |
107 | abab
108 |
109 | Sample Output-
110 |
111 | 3
112 |
113 | 2
114 |
115 |
116 | - Find the distance between two nodes in a binary tree.
117 |
118 |
119 |
120 | Reference
121 | https://www.geeksforgeeks.org/ola-interview-experience-set-15-1-year-experienced-for-sde1/
122 |
123 |
124 | Coding round questions
125 | - Implement simple queue library which support concurrent operation. The queue has to support these data type -> Integer, Long, Double, String. The queue has to support these operations-> push, pop, peek.
126 | - Implement a simple map library with supports concurrent operations. Map has to support Integer or string keys. Map value has to support these data type-> Integer, Long, Double, String. The map has to support these operations-> put, get, delete, exist.
127 | - Implement a simple in memory Filesystem library that support the following functionality-> create directory, create file, delete file, delete directory, list directory.
--------------------------------------------------------------------------------
/Palantir/README.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/PayPal/README.md:
--------------------------------------------------------------------------------
1 | # PayPal Interview Questions
2 | * [Coding Round Questions](#coding)
3 | * [Technical Interview Questions](#tech)
4 | * [Data Structures and Algorithms](#dsalg)
5 | * [DBMS](#dbms)
6 | * [Operating System](#os)
7 | * [Miscellaneous](#misc)
8 | * [References](#ref)
9 | ____
10 | Coding round questions
11 | - An array A consists of n cells, n ranges from 0 to n. Each cell consists of n elements whose value ranges from 1 to n. Create an array B such that B[i] must be as small as B[j] for all values of j that appears in A.
12 |
13 | - Find the least number of coins required that can make any desired amount. The coins can only be pennies(1), nickels(5), dimes(10) and quarters(25).
14 | - Given an integer array of size n, find the maximum of the minimum’s of every window size in the array. Note that window size varies from 1 to n.
15 |
16 | ----
17 | Technical Interview Questions
18 |
19 | Data Structures and Algorithms
20 | - Implement a singleton class.
21 | - Explain binary tree and binary search tree.
22 | - Implement stack using classes in C++.
23 | - Longest palindromic subsequence in string.
24 | - Detect loop in a linked list and remove it.
25 | - Select first 3 lines of the file. Select the longest line and count the number of words in that line.
26 | - Given an array of strings, find the shortest length palindrome.
27 | - Find the shortest cost path in a 3x3 matrix starting from top-left to bottom-right cell.
28 | - Design a sudoku solver.
29 |
30 |
31 | DBMS
32 | - Different types of joins.
33 |
34 | Operating System
35 | - Explain deadlock.
36 |
37 |
38 | Miscellaneous
39 | - What is dangling pointer?
40 | - What happens when you type a URL in web browser?
41 | - What are virtual functions and virtual destructors ?
42 | - Diamond structure problem.
43 | - What happens when you create an object using a base class pointer?
44 | - Why Java uses interface ?
45 | - Difference between array and ArrayList. Advantage of array.
46 | - Differnce between preincrement and postincrement.
47 | - Distinguish between Hashtable and HashMap.
48 | - How is HashMap implemented in Java?
49 | - Draw an entity relationship diagram for a student enrolment system.
50 | - Draw an entity relationship diagram for a airport management system.
51 | - Does encapsulation really exist in OOPS or is it just conceptual?
52 |
--------------------------------------------------------------------------------
/Postmates/README.md:
--------------------------------------------------------------------------------
1 | Postmates Interview Questions
2 | * [Coding Round Questions](#coding)
3 | * [Technical Interview Questions](#tech)
4 | * [Data Structures and Algorithm](#dsalg)
5 | * [Miscellaneous](#misc)
6 | * [References](#ref)
7 | ____
8 | Coding round questions
9 | - First non repeating character in a string
10 | - Check whether a string is 'beautiful'. A beautiful string is a string where the next lexographical character has less occurances than the previous character
11 | - Check if a 9x9 Sudoku board is valid
12 | - Given a square matrix of size NxN, complete the latin square. A Latin square is a square that contains N sets of numbers from 1 to N arranged tthat no such row or column contains the same number twice.
13 |
14 | Technical Interview Questions
15 |
16 | Data Structures and Algorithms
17 |
18 | DBMS
19 |
20 | Operating System
21 |
22 | System Design
23 | - Design FB messenger style chat system with support for group chats
24 |
25 | Miscellaneous
26 |
27 | References
28 | - LeetCode Discuss
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | [](#contributors)
3 | 
4 |
5 | # Companies*
6 |
7 | | | Companies|
8 | | ------ | ------ |
9 | | **E** | [Expedia](Expedia/README.md) |
10 | | **G** | [Grab](Grab/README.md) |
11 | | **M** | [MobiKwik](MobiKwik/README.md) |
12 | | **N** | [NEC Technologies](NEC%20Technologies/README.md) |
13 | | **P** | [PayPal](PayPal/README.md) |
14 | | **S** | [Samsung Research Institute](Samsung/README.md) |
15 | | **U** | [Uber](Uber/README.md) |
16 | | **Y** | [Yatra.com](Yatra.com/README.md) |
17 | | **Z** | [Zomato](Zomato/README.md) |
18 |
19 | ## Announcements👐
20 | 📣This repo is not participating in hacktoberfest this year.
21 | There are many unfinished articles in this repo. Feel free to contribute or create the issue.
22 |
23 | #### Note:
24 | This repo is for educational purposes only. If you are going to contribute, don't do symbolic contribution.
25 | Strictly adhere to contributing guidelines and hacktoberfest rules. Fixing grammar, typos and formatting only
26 | is complete non-sense. And non-sense is highly discouraged.
27 |
28 | ## Top Contributors ✨
29 |
30 | Thanks goes to these wonderful people:
31 |
32 |
Subash Selvaraj 💻 |
35 | Shruti Bhutaiya 💻 |
36 | Akshit Kharbanda 💻 |
37 | Dhruv Aggarwal 💻 |
38 | Cheshta Kwatra 💻 |
39 | Kartikay Shandil 💻 |
40 | Tanay Toshniwal 💻 |
41 |