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 first technical round taken by the SDE1 at Adobe based on problem solving. Interviewer asked me for my introduction and then gave me coding problem.



C++ Solution:
vector maxSlidingWindow(vector& nums, int k) {
vectorans;
int n = nums.size();
if(nq;
int i=0,j=0;
while(j {
while(q.size() && q.back() {
q.pop_back();
}
q.push_back(nums[j]);
if(j-i+1==k)
{
ans.push_back(q.front());
if(nums[i]==q.front())
{
q.pop_front();
}
i++;
}
j++;
}
return ans;
}
This was 2nd technical round taken by the senior software developer at Adobe



You can’t sell without buying first.
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Solution in Java
class Solution {
public int maxProfit(int k, int[] prices) {
if(prices.length==0 || k==0) return 0;
int dp[][]=new int[k+1][prices.length];
for(int i=1;i<=k;i++){
int max=Integer.MIN_VALUE;
for(int j=1;j max=Math.max(max,dp[i-1][j-1]-prices[j-1]);
dp[i][j]=Math.max(max+prices[j],dp[i][j-1]);
}
}
return dp[k][prices.length-1];
}
}
This was 3rd technical round taken by another senior software developer from adobe. He asked questions about my projects, and skills and previous work experience.



Time complexity
The time complexity of the above algorithm is O(n)
Space complexity
The algorithm runs in constant space O(1)
function findDuplicate(nums: number[]): number {
let orderedIndex=0;
while(orderedIndex
if(nums[orderedIndex]!==orderedIndex+1){// because our range from 1 to n
let unorderedIndex=nums[orderedIndex]-1;
if(nums[orderedIndex]!==nums[unorderedIndex]){
[nums[orderedIndex],nums[unorderedIndex]]=[nums[unorderedIndex],nums[orderedIndex]]
}else{
return nums[orderedIndex]
}
}else{
orderedIndex++;
}
}
return -1
};



‘N’ = 3, ‘coins’ = {1, 2, 3}, ‘freq’ = {1, 1, 3}, ‘V’ = 6
For the given example, we can make six by using the following coins:
{1, 2, 3}
{3. 3}
Hence, the answer is 2.
class Solution {
private:
int fn(int i,int tar,vector&nums,vector>&dp){
if(i==0){
if(tar%nums[i]==0){
return tar/nums[i];
}
else{
return 1e9;
}
}
if(dp[i][tar]!=-1){
return dp[i][tar];
}
int np=fn(i-1,tar,nums,dp);
int p= 1e9;
if(tar>=nums[i]){
p=1+fn(i,tar-nums[i],nums,dp);
}
return dp[i][tar]=min(p,np);
}
public:
int coinChange(vector& nums, int tar) {
int n=nums.size();
vector>dp(n,vector(tar+1,-1));
long ans=fn(n-1,tar,nums,dp);
if(ans== 1e9){
return -1;
}
return ans;
}
};

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?