Filter interviews by
Prototyping in JavaScript allows for quick and easy creation of new objects and functions.
Prototyping allows for inheritance and sharing of properties and methods.
New objects can be created using the 'new' keyword and the prototype of an existing object.
Functions can also be prototyped to add new methods or properties.
Example: function Person(name) { this.name = name; } Person.prototype.greet = function() { console.log...
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
Find an odd occurring number among even occurring numbers.
Use XOR operation to cancel out even occurring numbers and get the odd occurring number.
Iterate through the array and XOR each element with the result variable.
The final result will be the odd occurring number.
Print the spiral order of a binary tree and matrix.
For binary tree, use level order traversal and alternate direction for each level.
For matrix, use four pointers to traverse in spiral order.
Example for binary tree: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9
Example for matrix: 1 2 3 4 -> 8 7 6 5 -> 9 10 11 12 -> 16 15 14 13
Finding pairs in an array with a given sum.
Iterate through the array and for each element, check if the difference between the given sum and the element exists in the array.
Use a hash table to store the elements of the array and their indices for faster lookup.
If there are multiple pairs with the same sum, return any one of them.
If no pair is found, return null or an empty array.
Find total number of k element with given avg in an array in minimum time complexity.
Use sliding window technique to traverse the array in O(n) time complexity.
Maintain a sum variable to keep track of the sum of elements in the window.
If the sum of elements in the window is equal to k times the given avg, increment the count.
Move the window by subtracting the first element and adding the next element in the array.
Printing non-boundary elements of a binary tree
Traverse the tree in any order (preorder, inorder, postorder)
Check if the current node is not a boundary node (not the first or last node in its level)
If it is not a boundary node, print its value
Recursively traverse its left and right subtrees
Citi bank should set up its offices in major cities like Mumbai, Delhi, and Bangalore.
Citi bank should consider the economic and political stability of the region.
The bank should also consider the availability of skilled workforce and infrastructure.
Major cities like Mumbai, Delhi, and Bangalore have a large customer base and a well-established financial sector.
Setting up offices in multiple cities can help the bank re...
This question is asking for an analysis of the effectiveness and drawbacks of a certain approach or solution.
The question is asking for an evaluation of why a particular approach or solution is effective.
The answer should also include an analysis of the drawbacks or limitations of the approach.
Examples and evidence should be provided to support the analysis.
The response should demonstrate critical thinking and the abil...
Senior Software Engineer
510
salaries
| ₹9.7 L/yr - ₹30 L/yr |
Software Engineer
288
salaries
| ₹7 L/yr - ₹23 L/yr |
Senior Associate Software Engineer
105
salaries
| ₹11 L/yr - ₹25 L/yr |
Lead Software Engineer
103
salaries
| ₹18 L/yr - ₹39 L/yr |
Senior Test Analyst
82
salaries
| ₹7.9 L/yr - ₹26.6 L/yr |
Wells Fargo
JPMorgan Chase & Co.
Citicorp
American Express