TechDefence interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

TechDefence
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structure, OOPS, VAPT, Web Development, Algorithm, Linked list
Tip
Tip

Tip 1: Include at least 1 major and 1 minor project 
Tip 2: Include your practicing platform achievements or rank on online coding platforms
Tip 3: Practice development questions related to the website and database on practice platforms

Application process
Where: Linkedin
Eligibility: 7 CGPA,
Resume Tip
Resume tip

Tip 1 : Have some practical projects but include those only that you are confident about it.
Tip 2 : Put about your skill set which matches the applied role

Interview rounds

01
Round
Easy
Online Coding Test
Duration30 minutes
Interview date28 Mar 2022
Coding problem2

This round is around 30 minutes. only they will provide coding questions or some provide a web development page and check your skills so that you can apply your skills to find details about weaknesses in the software.

1. Reverse Words In A String

Easy
10m average time
90% success
0/40
Asked in companies
UnacademyIBMOptum

You are given a string 'str' of length 'N'.


Your task is to reverse the original string word by word.


There can be multiple spaces between two words and there can be leading or trailing spaces but in the output reversed string you need to put a single space between two words, and your reversed string should not contain leading or trailing spaces.


Example :
If the given input string is "Welcome to Coding Ninjas", then you should return "Ninjas Coding to Welcome" as the reversed string has only a single space between two words and there is no leading or trailing space.
Problem approach

Follow the below steps to solve the problem:

Run a for loop to traverse the string and create a temporary string to store the words
If the current character is a space then add the current string to the answer and empty the string
Else push the character into the string
Print the answer array in reverse order 

#include 
using namespace std;

// Function to reverse words*/
void reverseWords(string s)
{

// temporary vector to store all words
vector tmp;
string str = "";
for (int i = 0; i < s.length(); i++)
{

// Check if we encounter space
// push word(str) to vector
// and make str NULL
if (s[i] == ' ')
{
tmp.push_back(str);
str = "";
}

// Else add character to
// str to form current word
else
str += s[i];
}

// Last word remaining,add it to vector
tmp.push_back(str);

// Now print from last to first in vector
int i;
for (i = tmp.size() - 1; i > 0; i--)
cout << tmp[i] << " ";
// Last word remaining,print it
cout << tmp[0] << endl;
}

// Driver Code
int main()
{
string s = "i like this program very much";
reverseWords(s);
return 0;

Try solving now

2. String Palindrome

Easy
0/40
Asked in companies
ThalesInnovaccerUnacademy

Given a string, determine if it is a palindrome, considering only alphanumeric characters.

Palindrome
A palindrome is a word, number, phrase, or other sequences of characters which read the same backwards and forwards.
Example:
If the input string happens to be, "malayalam" then as we see that this word can be read the same as forward and backwards, it is said to be a valid palindrome.

The expected output for this example will print, 'true'.

From that being said, you are required to return a boolean value from the function that has been asked to implement.

Problem approach

Follow the given steps to solve the problem

Find all the positions of the first character of the original string in the string to be checked.
For every position found, consider it to be the starting index of the string to be checked.
Beginning from the new starting index, compare both strings and check whether they are equal or not.
(Suppose the original string to is s1, string to be checked to be s2,n is the length of strings and j is the position of the first character of s1 in s2, then for i < (length of original string) , check if s1[i]==s2[(j+1)%n). Return false if any character mismatch is found, else return true.
Repeat 3rd step for all positions found. 

import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int price[] = new int[n];
for(int i=0;i diff = new Vector<>();
for(int i=n-2;i>=0;i--) {
diff.add(price[i+1]-price[i]);
}
int ans = solve(diff);
if(ans<0) {
System.out.println(0);
}else {
System.out.println(ans);
}

}
private static int solve(Vector v) {
int n = v.size();
if(n==0) {
return 0;
}
int mx = v.get(0);
for(int i=1;i < n;i++) {
mx = Math.max(mx, v.get(i));
}
if(mx<=0) {
return 0;
}
int mxSum=0,csum=0;
for(int i=0;i < n;i++) {
csum+=v.get(i);
if(csum < 0)
csum=0;
mxSum = Math.max(csum, mxSum);
}
return mxSum;
}
}

Try solving now
02
Round
Easy
HR Round
Duration20 minutes
Interview date4 Oct 2022
Coding problem1

The time of the round was around 20 minutes. It was a general discussion round about salary, location about work.
and documentation & some general questions.
 

1. Basic HR Questions

Are you ready to relocate?
Where do you see yourself after 5 years?
Why did you choose the exploit development field instead of the developer?

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4656 views
0 comments
0 upvotes
SDE - 1
2 rounds | 3 problems
Interviewed by TechDefence
670 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114578 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34960 views
7 comments
0 upvotes