Tip 1 : Have self motivation and solve problems regularly
Tip 2 : If you are able to solve some level of problems then please do increase the rating/level
Tip 3 : Have some basic projects and just ensure that you full idea if you mention that in your resume
Tip 1: Mention some key points in resume and highlight main things
Tip 2: Write only what you have done/achieved and don't write something which can prove you wrong in time of interviews
2 coding problems, some apptitude and programming questions



if Ayush want to study 6 chapters in 3 days and the time that each chapter requires is as follows:
Chapter 1 = 30
Chapter 2 = 20
Chapter 3 = 10
Chapter 4 = 40
Chapter 5 = 5
Chapter 6 = 45
Then he will study the chapters in the following order
| day 1 : 1 , 2 | day 2 : 3 , 4 | day 3 : 5 , 6 |
Here we can see that he study chapters in sequential order and the maximum time to study on a day is 50, which is the minimum possible in this case.
Way to solve this problem is to use Binary Search, based on this idea:
Case 1: When no valid answer exists.
If the number of students is greater than the number of books (i.e, M > N), In this case at least 1 student will be left to which no book has been assigned.
Case 2: When a valid answer exists.
The maximum possible answer could be when there is only one student. So, all the book will be assigned to him and the result would be the sum of pages of all the books.
The minimum possible answer could be when number of student is equal to the number of book (i.e, M == N) , In this case all the students will get at most one book. So, the result would be the maximum number of pages among them (i.e, maximum(pages[])).
Hence, we can apply binary search in this given range and each time we can consider the mid value as the maximum limit of pages one can get. And check for the limit if answer is valid then update the limit accordingly.
1. Initialize a variable, say cntSteps to store the maximum count of steps required to remove all the coins from the arr[] array.
2. Create a map, say Map to store the frequency of elements of the arr[] array in ascending order.
Initialize a variable, say Min to store the smallest element of the Map.
3. Traverse the Map and in each traversal remove the Min and (Min + 1) from Map and also increment the value of cntSteps by 1.
4. Finally, print the value of cntSteps.
Which of the following is a structured programming technique that graphically represents the detailed steps required to solve a program?
Ans: Flowchart
Which of the following data structures can be used to implement queues?
1. Stack
2. Array
3. LinkedList
4. All of the Above
All of the above
implemented in 1 way(suffix tree) and explained how to do with other algos(z-algo, KMP) and what's the difference
Difference between LRU and LFU Page Replacement Algorithm. What is LRU Page Replacement Algorithm? Asked some more related problems
Tip 1:
Tip 2:
Tip 3:



1. A binary search tree is a binary tree data structure, with the following properties
a. The left subtree of any node contains nodes with the value less than the node’s value.
b. The right subtree of any node contains nodes with the value equal to or greater than the node’s value.
c. Right, and left subtrees are also binary search trees.
2. It is guaranteed that all nodes in the given tree will have distinct positive integral values .
3. The given tree may or may not contain a node of value equal to the given value ‘K’.


1. You have to split the given tree in such a way that the structure of both returned trees is similar to the originally given tree, i.e. if a parent node ‘P’ and child node ‘C’ lies on the same tree after splitting, then ‘C must be the same child of ‘P’.
2. If there is no valid tree, then return ‘NULL’ node in its place.
This is a standard DSA problem so implemented directly as i was already aware of this problem
Imagine you are tasked with designing a parking lot system. Consider the following requirements:
The parking lot has multiple levels, each containing multiple spots.
There are different types of spots (compact, regular, handicapped, etc.).
Cars of different sizes (small, medium, large) can park in the parking lot.
The system should be able to find an available spot for a given car size.
Problems:
1. Implement methods for cars entering and leaving the parking lot.
2. Provide functionality to check the current occupancy and availability of spots on each level.
Tip 1:
Tip 2:
Tip 3:




The area of the largest square submatrix with all 1s is 4.
int maximalSquare(vector> &matrixOfChars) {
const auto h = matrixOfChars.size();
const auto w = matrixOfChars[0].size();
unsigned short matrix[300 * 300];
{
auto destIt = matrix;
for (auto srcIt = matrixOfChars.begin(); srcIt < matrixOfChars.end(); ++srcIt, destIt += w) {
std::transform(std::execution::par_unseq, srcIt->begin(), srcIt->end(), destIt,
[](const auto &x) { return x - '0'; });
}
}
unsigned short maxSize = *std::max_element(std::execution::par_unseq, matrix, matrix + w);
for (auto it = matrix + w; it != matrix + w * h; it += w) {
maxSize = std::max(maxSize, *it);
}
for (auto rowIt = matrix + w; rowIt != matrix + w * h; rowIt += w) {
for (auto colIt = rowIt + 1; colIt != rowIt + w; ++colIt) {
const unsigned int minOfNeighbours = std::min(
std::min(
*(colIt - w - 1),
*(colIt - w)),
*(colIt - 1));
const unsigned short oldValue = *colIt;
const unsigned short newSize = oldValue
? (minOfNeighbours + 1)
: 0;
*colIt = newSize;
maxSize = std::max(maxSize, newSize);
}
}
const auto result = int(maxSize) * int(maxSize);
return result;
}
Tip 1:
Tip 2:
Tip 3:

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?