Tip 1 : Must do Previously asked Interviews Questions.
Tip 2 : Prepare OS, DBMS, OOPs, Computer Networks well.
Tip 3 : Prepare well for one project mentioned in the resume, the interviewer may ask any question related to the project, especially about the networking part of the project.
Tip 1 : Have at least 2 good projects mentioned in your resume with a link
Tip 2 : Focus on skills, internships, projects, and experiences.
Tip 3 : Make it simple, crisp, and one page
This was the online test taken on the hackerrank platform. There were 15 MCQs questions based on coding, DBMS, networking, operating system and there were 2 coding questions.



class Solution {
public:
void nextPermutation(vector& permutation) {
int n = permutation.size(), k,l;
for(k=n-2; k>=0; k--){
if(permutation[k]k; l--){
if(permutation[k] }
swap(permutation[k],permutation[l]);
reverse(permutation.begin()+k+1, permutation.end());
}
}
};



Consider ARR = [“coding”, ”codezen”, ”codingninja”, ”coders”]
The longest common prefix among all the given strings is “cod” as it is present as a prefix in all strings. Hence, the answer is “cod”.
class Solution {
public String longestCommonPrefix(String[] strs) {
if (strs.length == 0)
return "";
String prefix = strs[0];
int len=0;
for (int i = 1; i < strs.length; i++)
while (strs[i].indexOf(prefix) != 0) {
len = prefix.length()-1;
//System.out.println(len);
prefix = prefix.substring(0, len);
if (prefix.isEmpty()) return "";
}
return prefix;
}
}
This was technical interview taken by the senior software developer at Cisco. Interviewer gave two coding questions during the interview.




A top down solution for the "Decode Ways" problem. The approach followed is similar to the solution for the "Word Break" problem, which in turn is similar to the "Rod Cutting" problem in CLRS. Every partition is checked to see if it can be decoded. Since partitions may be repeatedly considered, memoization is used to prevent repeating computations.
'''
class Solution {
int numWays(string s, int i, int * dp) {
int res = 0;
int n = s.length();
// The end of the array has been reached and so the string
// can be decoded
if(i == n) {
return 1;
}
// Get results from memo table if available
if(dp[i] != -1) {
return dp[i];
}
// Cut input string at i creating a substring of size 1
// and determine if remaining substring can be decoded
if(i < n) {
string s_loc = s.substr(i, 1);
int val = stoi(s_loc);
if(1 <= val && val <= 26) {
if(s[i] == '0') {
res = 0;
}
if(s[i] != '0') {
res = numWays(s, i + 1, dp);
}
}
}
// Cut input string at i creating a substring of size 2
// and determine if remaining substring can be decoded
if(i < n - 1) {
string s_loc = s.substr(i, 2);
int val = stoi(s_loc);
if(1 <= val && val <= 26) {
if(s[i] == '0') {
res = 0;
}
if(s[i] != '0') {
res = res + numWays(s, i + 2, dp);
}
}
}
// Store results in memo table
dp[i] = res;
return res;
}
public:
int numDecodings(string s) {
int n = s.length();
// Declare and initialize memo table
int * dp = new int[n];
for(int i = 0; i < n; ++i) {
dp[i] = -1;
}
// Compute number of ways to decode
return numWays(s, 0, dp);
}
};



Input: ‘M’ = 3, 'N' = 4, ‘mat’ = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]], ‘target’ = 8
Output: true
Explanation: The output should be true as '8' exists in the matrix.
Since the array is Sorted in both row wise and column wise, Start the checking from first row and last col.
Why Not first row and First Col? Coz If the target is greater than the currentElement You will get confused as u can
move in both directions row wise and colwise.
Hence starting for first row and last col u can explore only 1 direction. If the target is greater than current element then move downwards(As array is sorted , we will have larger elements in the following rows) else move sidewards(bcos target is less than cur element).
class Solution {
public boolean searchMatrix(int[][] matrix, int target) {
int m = matrix.length;
int n = matrix[0].length;
int row = 0;
int col = n - 1;
while(row < m && col >=0){
if(matrix[row][col] == target)
return true;
else if(matrix[row][col] < target)
row++;
else
col--;
}
return false;
}
}
This was 2nd technical round taken by the senior Software developer from the Cisco. This interview was focused on the DSA and project work.
Explain you project in detail
what challenges you have faced while making this project
why did you choose this technology to make this project
where did you hosted your project and how ?




In the above image, areas in green, red, and violet color are all submatrices of the original 4x4 matrix.
1. Binary valued matrix has only two values in each cell : 0 and 1.
2. A submatrix is a matrix formed by selecting certain rows and columns from a larger matrix.
3. The area of a matrix with 'h' rows and 'w' columns is equal to 'h' * 'w'.
Simple C++ Solution based on histogram question
If you haven't done histogram question then complete it first because it concept is same just with one extra loop.
Time Complexity - O(N^2)
Space Complexity - O(N)
int maximalRectangle(vector> &m)
{
int ans = 0;
vector sums(m[0].size(), 0);
for (int i = 0; i < m.size(); i++)
{
// From here histogram solution starts
stack st;
for (int j = 0; j <= sums.size(); j++)
{
// Summing up each row in sums vector but replacing with zero if current element is zero
if(j != sums.size())
sums[j] += (m[i][j] == '0') ? -sums[j] : m[i][j] - '0';
// Simple increasing Montonic Stack
while (!st.empty() && (j == sums.size() || sums[st.top()] >= sums[j]))
{
int height = sums[st.top()], width;
st.pop();
width = (st.empty()) ? j : j - st.top() - 1;
ans = max(ans, width * height);
}
st.push(j);
}
}
return ans;
}



You do not need to print anything, just return the head of the reversed linked list.
ListNode* reverseList(ListNode* head) {
ListNode *prev = NULL, *cur=head, *tmp;
while(cur){
tmp = cur->next;
cur->next = prev;
prev = cur;
cur = tmp;
}
return prev;
}

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: