Filter interviews by
Given an array of integers ARR
of size N, consisting of 0s and 1s, you need to select a sub-array and flip its bits. Your task is to return the maximum count of 1s that can be...
Maximize the count of 1s in a binary array by flipping a sub-array of 0s to 1s at most once.
Initial Count: Start by counting the number of 1s in the original array.
Flipping Logic: For each sub-array, calculate the effect of flipping 0s to 1s and 1s to 0s.
Kadane's Algorithm: Use a modified version of Kadane's algorithm to find the maximum gain from flipping a sub-array.
Edge Cases: Consider cases where the array is ...
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell t...
Maximize profit from stock prices over N days with up to two buy-and-sell transactions.
Two Transactions: You can buy and sell stocks twice to maximize profit.
Sell Before Buy: Ensure you sell a stock before buying again.
Example 1: Prices = [3, 3, 5, 0, 0] yields max profit of 6.
Example 2: Prices = [7, 6, 4, 3, 1] yields max profit of 0.
Dynamic Programming: Use dynamic programming to track profits efficiently.
Given a string STR
, your task is to remove spaces from STR
and convert it to Pascal case format. The function should return the modified STR
.
In Pascal case, words are conc...
Convert a given string to Pascal case by removing spaces and capitalizing the first letter of each word.
Input Handling: Read the number of test cases and each string to be processed.
String Manipulation: Split the string by spaces, capitalize each word, and join them without spaces.
Example: 'hello world' becomes 'HelloWorld'.
Efficiency: Ensure the solution handles up to 500,000 characters efficiently due to constra...
Given a string S
consisting of digits from 2 to 9, the task is to generate all possible strings that can be formed by mapping these digits to letters on a T9 keypad. ...
Generate all possible letter combinations from a T9 keypad input string, sorted lexicographically for each test case.
Mapping Digits: Each digit from 2 to 9 corresponds to specific letters (e.g., 2 -> 'abc', 3 -> 'def').
Combination Generation: Use backtracking or iterative methods to generate all possible combinations of letters for the given digits.
Lexicographical Order: Ensure the output combinations are so...
You are provided with an array ARR
consisting of N
distinct integers in ascending order and an integer TARGET
. Your objective is to count all the distinct pairs in ARR
whose sum ...
Count distinct pairs in a sorted array that sum up to a given target value, returning -1 if no pairs exist.
Two-Pointer Technique: Use two pointers, one at the start and one at the end of the array, to find pairs efficiently.
Distinct Elements: Since the array contains distinct integers, each valid pair will be unique.
Example: For ARR = [1, 2, 3] and TARGET = 4, the only pair is (1, 3).
Return Value: If pairs are fou...
SQL query to find records in one table that do not exist in another table using LEFT JOIN or NOT EXISTS.
LEFT JOIN: Use a LEFT JOIN to combine both tables and filter where the second table's key is NULL. Example: SELECT a.* FROM TableA a LEFT JOIN TableB b ON a.id = b.id WHERE b.id IS NULL.
NOT EXISTS: Use a subquery with NOT EXISTS to check for non-existence. Example: SELECT * FROM TableA a WHERE NOT EXISTS (SELECT...
Given a binary tree with 'N' nodes, identify the path from a leaf node to the root node that has the maximum sum among all root-to-leaf paths.
All the possible...
Find the maximum sum path from a leaf node to the root in a binary tree using level order input.
Input Format: The binary tree is represented in level order, with '0' indicating null nodes.
Example: For input '4 -2 3 4 0 5 6 0 7 0 0 0 0 0 0', the tree structure can be visualized.
Path Calculation: Traverse the tree recursively to calculate the sum of paths from leaves to the root.
Output: Return the path with the maxi...
I applied via Campus Placement and was interviewed in Aug 2023. There were 3 interview rounds.
Coderbyte platform was used
There were 3 easy problems related to string and array manipulation and 2 medium to hard problems of lru cache implementation and the other one was of the time difference between the given 12hour format time (it was given in string) and there was a sql hard question in which it asked us to filter the table based on the given conditions and add a column with a given condition
I appeared for an interview in Oct 2020.
Round duration - 60 minutes
Round difficulty - Easy
You are provided with an array ARR
consisting of N
distinct integers in ascending order and an integer TARGET
. Your objective is to count all the distinct pairs in ARR
whose sum...
Count distinct pairs in a sorted array that sum up to a given target value, returning -1 if no pairs exist.
Two-Pointer Technique: Use two pointers, one at the start and one at the end of the array, to find pairs efficiently.
Distinct Elements: Since the array contains distinct integers, each valid pair will be unique.
Example: For ARR = [1, 2, 3] and TARGET = 4, the only pair is (1, 3).
Return Value: If pairs are found, r...
Given a binary tree with 'N' nodes, identify the path from a leaf node to the root node that has the maximum sum among all root-to-leaf paths.
All the possibl...
Find the maximum sum path from a leaf node to the root in a binary tree using level order input.
Input Format: The binary tree is represented in level order, with '0' indicating null nodes.
Example: For input '4 -2 3 4 0 5 6 0 7 0 0 0 0 0 0', the tree structure can be visualized.
Path Calculation: Traverse the tree recursively to calculate the sum of paths from leaves to the root.
Output: Return the path with the maximum s...
SQL query to find records in one table that do not exist in another table using LEFT JOIN or NOT EXISTS.
LEFT JOIN: Use a LEFT JOIN to combine both tables and filter where the second table's key is NULL. Example: SELECT a.* FROM TableA a LEFT JOIN TableB b ON a.id = b.id WHERE b.id IS NULL.
NOT EXISTS: Use a subquery with NOT EXISTS to check for non-existence. Example: SELECT * FROM TableA a WHERE NOT EXISTS (SELECT 1 FR...
Round duration - 30 minutes
Round difficulty - Easy
Given a string STR
, your task is to remove spaces from STR
and convert it to Pascal case format. The function should return the modified STR
.
In Pascal case, words are con...
Convert a given string to Pascal case by removing spaces and capitalizing the first letter of each word.
Input Handling: Read the number of test cases and each string to be processed.
String Manipulation: Split the string by spaces, capitalize each word, and join them without spaces.
Example: 'hello world' becomes 'HelloWorld'.
Efficiency: Ensure the solution handles up to 500,000 characters efficiently due to constraints.
Round duration - 60 Minutes
Round difficulty - Easy
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
Maximize profit from stock prices over N days with up to two buy-and-sell transactions.
Two Transactions: You can buy and sell stocks twice to maximize profit.
Sell Before Buy: Ensure you sell a stock before buying again.
Example 1: Prices = [3, 3, 5, 0, 0] yields max profit of 6.
Example 2: Prices = [7, 6, 4, 3, 1] yields max profit of 0.
Dynamic Programming: Use dynamic programming to track profits efficiently.
Given a string S
consisting of digits from 2 to 9, the task is to generate all possible strings that can be formed by mapping these digits to letters on a T9 keypad....
Generate all possible letter combinations from a T9 keypad input string, sorted lexicographically for each test case.
Mapping Digits: Each digit from 2 to 9 corresponds to specific letters (e.g., 2 -> 'abc', 3 -> 'def').
Combination Generation: Use backtracking or iterative methods to generate all possible combinations of letters for the given digits.
Lexicographical Order: Ensure the output combinations are sorted ...
Tip 1 : Mention 1 project at least in your resume which is done by you . Never mention a project copied from google.
Tip 2 : Prepare for basic of OOPS and Operating System.
Tip 3 : You have to some Knowledge of System design .
Tip 4 : never give wrong answer if you don't know the answer simply say it to interviewr.
Tip 1 : Never add fake information related to project and other stuff.
Tip 2 : Keep resume simple do not add unnecessary info like you ranked 1st in 5th class.
I appeared for an interview in Oct 2020.
Round duration - 60 Minutes
Round difficulty - Medium
The test was conducted around 3 pm . Four coding questions were there. 2 questions were easy and 2 were of moderate difficulty level. It was conducted remotely with video proctoring.I was able to solve all the 4 questions.
Given a string S
consisting of digits from 2 to 9, the task is to generate all possible strings that can be formed by mapping these digits to letters on a T9 keypad....
Generate all possible strings by mapping digits to letters on a T9 keypad and print them in lexicographical order.
Create a mapping of digits to letters on a T9 keypad
Use recursion to generate all possible combinations of letters for the given digits
Sort the generated strings in lexicographical order
Return the sorted strings as an array of strings
Given an array of integers ARR
of size N, consisting of 0s and 1s, you need to select a sub-array and flip its bits. Your task is to return the maximum count of 1s that can b...
Maximize the count of 1s in a binary array by flipping a sub-array of 0s to 1s at most once.
Initial Count: Start by counting the number of 1s in the original array.
Flipping Logic: For each sub-array, calculate the effect of flipping 0s to 1s and 1s to 0s.
Kadane's Algorithm: Use a modified version of Kadane's algorithm to find the maximum gain from flipping a sub-array.
Edge Cases: Consider cases where the array is all 1...
Round duration - 10 Minutes
Round difficulty - Easy
It was a telephonic round. The HR asked some basic questions like how was your experience in the previous rounds.
Tip 1 : Practise as many questions as possible of DSA from Leetcode or coding ninjas.
Tip 2 : Study fundamentals of subjects like OS, DBMS and Computer Network and do atleast 2 good projects.
Tip 3 : Do atleast 200 questions.
Tip 1 : Have atleast 2-3 projects on resume.
Tip 2 : Mention profile links of github and codechef/codeforces.
Top trending discussions
I applied via Naukri.com and was interviewed in Feb 2021. There were 3 interview rounds.
I applied via Campus Placement and was interviewed before Jun 2020. There were 6 interview rounds.
I applied via Campus Placement and was interviewed before Nov 2019. There were 4 interview rounds.
Java is a high-level programming language known for its platform independence and object-oriented approach.
Java is widely used for developing desktop, web, and mobile applications.
It is known for its robustness, security, and scalability.
Java programs are compiled into bytecode that can run on any Java Virtual Machine (JVM).
It supports multithreading, exception handling, and automatic memory management.
Popular framewor...
based on 1 interview experience
Difficulty level
based on 9 reviews
Rating in categories
Software Engineer
8
salaries
| ₹6 L/yr - ₹18.9 L/yr |
Senior Software Engineer
5
salaries
| ₹16 L/yr - ₹27.5 L/yr |
Software Developer
4
salaries
| ₹4.5 L/yr - ₹11.7 L/yr |
UI Designer
4
salaries
| ₹5.5 L/yr - ₹8 L/yr |
Senior Software Test Engineer
4
salaries
| ₹12 L/yr - ₹14 L/yr |
TCS
Accenture
Infosys
Wipro