Tip 1: Most important DSA - Medium level. Practice on GeeksforGeeks or InterviewBit.
Tip 2: Engage in some web development using frameworks like Node.js, Spring Boot, Django, React, etc.
Tip 3: Brush up on basic computer science concepts for OOPs.
Tip 1: Create a crisp one-page resume.
Tip 2: Showcase unique web development projects on your resume.
10 MCQs
2 DSA questions - 1 easy and 1 medium



1. There may be more than one occurrence of 'P' in 'S'.
2. Some alphabets in the strings may be repeated.
How to use lps[] to decide the next positions (or to know the number of characters to be skipped)?
We start the comparison of pat[j] with j = 0 with characters of the current window of text.
We keep matching characters txt[i] and pat[j] and keep incrementing i and j while pat[j] and txt[i] keep matching.
When we see a mismatch
We know that characters pat[0..j-1] match with txt[i-j…i-1] (Note that j starts with 0 and increments it only when there is a match).
We also know (from the above definition) that lps[j-1] is the count of characters of pat[0…j-1] that are both proper prefix and suffix.
From the above two points, we can conclude that we do not need to match these lps[j-1] characters with txt[i-j…i-1] because we know that these characters will anyway match. Let us consider the above example to understand this.



Given an array of N integers, and an integer K, find the number of pairs of elements in the array whose sum is equal to K.
// C++ implementation of simple method to find count of
// pairs with given sum K.
#include
using namespace std;
// Returns number of pairs in arr[0..n-1] with sum equal
// to 'K'
int getPairsCount(int arr[], int n, int K)
{
// Initialize result
int count = 0;
// Consider all possible pairs and check their sums
for (int i = 0; i < n; i++)
for (int j = i + 1; j < n; j++)
if (arr[i] + arr[j] == K)
count++;
return count;
}
// Driver function to test the above function
int main()
{
int arr[] = { 1, 5, 7, -1 };
int n = sizeof(arr) / sizeof(arr[0]);
int K = 6;
cout << "Count of pairs is "
// Function Call
<< getPairsCount(arr, n, K);
return 0;
}
// This code is contributed by Aditya Kumar (adityakumar129)
One on one screen share interview.
Given a sorted array consisting 0s and 1s. The task is to find the index of first 1 in the given array.
// C++ implementation to find the index of
// first '1' in a sorted array of 0's and 1's
#include
using namespace std;
// function to find the index of first '1'
int indexOfFirstOne(int arr[], int n)
{
// traverse the array from left to right
for (int i = 0; i < n; i++)
// if true, then return i
if (arr[i] == 1)
return i;
// 1's are not present in the array
return -1;
}
// Driver program to test above
int main()
{
int arr[] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 };
int n = sizeof(arr) / sizeof(arr[0]);
cout << indexOfFirstOne(arr, n);
return 0;
}
Given a string s, check if it can be constructed by taking a substring of it and appending multiple copies of the substring together.
class Solution {
public:
bool repeatedSubstringPattern(string s) {
int n=s.size();
for(int i=n/2;i>=1;i--){
if(n%i==0){
if(s.substr(0,n-i)==s.substr(i))return true;
}
}
return false;
}
};
Interviewer asked about the dev projects done. I explained my projects, then he went onto asking the details of projects like what libraries i used. Some discussion went onto the encryption logic i used on my user login service on my projects. After that, Discussed on future prospects of software engineering. Was a fun interview, something totally different from DSA centric, with we were already accustomed. Overall, experience was good. Interview made me feel enough comfortable at first.
Tip 1: talk about new tech
Tip 2: work on Prompt engineering, AI etc and talk about that
Tip 1: Focus on main elements of the projects you did
Tip 2: Talk about the libraries used
Tip 1: Work extensively on nosql Databases
Tip 2: talk about tools you used in projects

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?