Tip 1 : Practice Questions and focus on grabbing the concept rather than increasing the count.
Tip 2 : Whatever Keyword you use in your CV- Projects or skills known should be well prepared and in-depth Knowledge of the Project such as how to make it Efficient, shortcomings, and Scalability issues should be known.
Tip 3 : Work on Communication skills, very important for MNCs.
Tip 1 : Include good projects and have in-depth knowledge about them, this would increase the chances of your resume getting shortlisted
Tip 2 : Only mention relevant and known skills because it is quite possible that the interviewer starts asking questions about any of those topics.
We will traverse the string from left to right. For each substring that contains the same characters, we calculate the sum of the costs and the maximum cost mx. We add sum-mx to the answer.
I have attached the code for reference:
class Solution {
public:
int minCost(string s, vector& cost) {
int i = 0, N = s.size(), ans = 0;
while (i < N) {
int j = i, sum = 0, mx = 1...
The problem requires us to calculate the longest path using an adjacency list and keeping a variable mx to keep a count of max. I have attached the code for reference:
#include
int longest_path(int node,int parent, bool odd,vector adj[])
{
if(odd &&(node%2==1))
return 0;
int mx=0;
for (auto adjNode:adj[node])
{
if(adjNode!=parent)
{
bool sOdd=odd| (n...
It was a very simple binary search problem, I initially told the interviewer about my approach. The first approach was Brute force that is linear seach after which he asked me to optimize it and then i told him about muy approach of linear search to reduce complexity and he asked me to code it.
I have attached it for reference:
bool isBadVersion(int version);
class Solution {
pu...
Types of Joins
How to choose primary key?
What are views?
What will you do if you want the top 5 records from a table?
Tip 1 : Read SQL Queries
Tip 2 : Read DBMS interview questions
Tip 3 : Focus on Keywords