Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Infineon Technologies interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Infineon Technologies
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Algorithms , OOPS, Dynamic Programming , DBMS , CN , OS , Graphs
Tip
Tip

Tip 1 : Practice Atleast 250 good Questions covering various topics/
Tip 2 : Do atleast 2 projects
Tip 3 : Work on your communication skill as well

Application process
Where: Campus
Eligibility: 7+ CGPA with no backlog
Resume Tip
Resume tip

Tip 1 : Try to limit your resume to a one-pager.
Tip 2 : Do not put fake on resume.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration60 Minutes
Interview date25 Sep 2020
Coding problem2

We received OA link over our mail and had to attempt that from 3 pm - 4pm on the same day.

1. Longest Substring Without Repeating Characters

Moderate
20m average time
80% success
0/80
Asked in companies
Morgan StanleyWells FargoAmazon

Given a string 'S' of length 'L', return the length of the longest substring without repeating characters.

Example:

Suppose given input is "abacb", then the length of the longest substring without repeating characters will be 3 ("acb").
Problem approach

The basic idea is, keep a hashmap which stores the characters in string as keys and their positions as values, and keep two pointers which define the max substring. move the right pointer to scan through the string , and meanwhile update the hashmap. If the character is already in the hashmap, then move the left pointer to the right of the same character last found. Note that the two pointers can only move forward.

Try solving now

2. Add Two Numbers As Linked Lists ll

Moderate
10m average time
80% success
0/80
Asked in companies
MicrosoftQuikrAccenture

You have been given two singly Linked Lists, where each of them represents a positive number without any leading zeros.

Your task is to add these two numbers and print the summation in the form of a linked list.

Example:
If the first linked list is 1 -> 2 -> 3 -> 4 -> 5 -> NULL and the second linked list is 4 -> 5 -> NULL.

The two numbers represented by these two lists are 12345 and 45, respectively. So, adding these two numbers gives 12390. 

So, the linked list representation of this number is 1 -> 2 -> 3 -> 9 -> 0 -> NULL.
Problem approach

public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
ListNode prev = new ListNode(0);
ListNode head = prev;
int carry = 0;
while (l1 != null || l2 != null || carry != 0) {
ListNode cur = new ListNode(0);
int sum = ((l2 == null) ? 0 : l2.val) + ((l1 == null) ? 0 : l1.val) + carry;
cur.val = sum % 10;
carry = sum / 10;
prev.next = cur;
prev = cur;

l1 = (l1 == null) ? l1 : l1.next;
l2 = (l2 == null) ? l2 : l2.next;
}
return head.next;
}

Try solving now
02
Round
Easy
Video Call
Duration45 Minutes
Interview date28 Sep 2020
Coding problem2

We were required to join google meet call.

1. Find All Triplets With Zero Sum

Moderate
30m average time
50% success
0/80
Asked in companies
GoogleFacebookDunzo

You are given an array Arr consisting of n integers, you need to find all the distinct triplets present in the array which adds up to zero.

An array is said to have a triplet {arr[i], arr[j], arr[k]} with 0 sum if there exists three indices i, j and k such that i!=j, j!=k and i!=k and arr[i] + arr[j] + arr[k] = 0.

Note :
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then (2, -3, 1), (-3, 2, 1) etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Problem approach

The idea is to sort an input array and then run through all indices of a possible first element of a triplet. For each possible first element we make a standard bi-directional 2Sum sweep of the remaining part of the array. Also we want to skip equal elements to avoid duplicates in the answer without making a set or smth like that.

public List> threeSum(int[] num) {
Arrays.sort(num);
List> res = new LinkedList<>(); 
for (int i = 0; i < num.length-2; i++) {
if (i == 0 || (i > 0 && num[i] != num[i-1])) {
int lo = i+1, hi = num.length-1, sum = 0 - num[i];
while (lo < hi) {
if (num[lo] + num[hi] == sum) {
res.add(Arrays.asList(num[i], num[lo], num[hi]));
while (lo < hi && num[lo] == num[lo+1]) lo++;
while (lo < hi && num[hi] == num[hi-1]) hi--;
lo++; hi--;
} else if (num[lo] + num[hi] < sum) lo++;
else hi--;
}
}
}
return res;
}

Try solving now

2. Reverse Nodes in k-Group

Hard
56m average time
30% success
0/120
Asked in companies
SAP LabsHikeAdobe

You are given a Singly Linked List of integers and an integer array 'B' of size 'N'. Each element in the array 'B' represents a block size. Modify the linked list by reversing the nodes in each block whose sizes are given by the array 'B'.

Note:
1. If you encounter a situation when 'B[i]' is greater than the number of remaining nodes in the list, then simply reverse the remaining nodes as a block and ignore all the block sizes from 'B[i]'. 

2. All block sizes are contiguous i.e. suppose that block 'B[i]' ends at a node cur, then the block 'B[i+1]' starts from the node just after the node cur.
Example
Linked list: 1->2->3->4->5
Array B: 3 3 5

Output: 3->2->1->5->4

We reverse the first block of size 3 and then move to block 2. Now, since the number of nodes remaining in the list (2) is less than the block size (3), we reverse the remaining nodes (4 and 5) as a block and ignore all the block sizes that follow.
Problem approach

public ListNode reverseKGroup(ListNode head, int k) {
ListNode curr = head;
int count = 0;
while (curr != null && count != k) { // find the k+1 node
curr = curr.next;
count++;
}
if (count == k) { // if k+1 node is found
curr = reverseKGroup(curr, k); // reverse list with k+1 node as head
// head - head-pointer to direct part, 
// curr - head-pointer to reversed part;
while (count-- > 0) { // reverse current k-group: 
ListNode tmp = head.next; // tmp - next head in direct part
head.next = curr; // preappending "direct" head to the reversed list 
curr = head; // move head of reversed part to a new node
head = tmp; // move "direct" head to the next node in direct part
}
head = curr;
}
return head;
}

Try solving now
03
Round
Easy
Video Call
Duration30 Minutes
Interview date28 Sep 2020
Coding problem1

We were required to join a google meet call

1. Minimum operation needed to convert to the given string

Moderate
26m average time
0/80
Asked in companies
AppleMicrosoftRazorpay

You are given two strings 'str1' and 'str2'. Find the minimum operations required to convert str1 into str2.

An Operation is defined as:
A character from an index of a string(str1) is put at the end of it, is defined as a single operation.
 Note :
You cannot perform any operation on the string, str2.
Problem approach

public int minDistance(String word1, String word2) {
int m = word1.length();
int n = word2.length();

int[][] cost = new int[m + 1][n + 1];
for(int i = 0; i <= m; i++)
cost[i][0] = i;
for(int i = 1; i <= n; i++)
cost[0][i] = i;

for(int i = 0; i < m; i++) {
for(int j = 0; j < n; j++) {
if(word1.charAt(i) == word2.charAt(j))
cost[i + 1][j + 1] = cost[i][j];
else {
int a = cost[i][j];
int b = cost[i][j + 1];
int c = cost[i + 1][j];
cost[i + 1][j + 1] = a < b ? (a < c ? a : c) : (b < c ? b : c);
cost[i + 1][j + 1]++;
}
}
}
return cost[m][n];
}

Try solving now

Here's your problem of the day

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

Skill covered: Programming

How do you write a single-line comment in C++?

Choose another skill to practice
Start a Discussion
Similar interview experiences
SDE - Intern
3 rounds | 3 problems
Interviewed by Infineon Technologies
1318 views
0 comments
0 upvotes
Business Technology Analyst
4 rounds | 5 problems
Interviewed by Squadstack
2366 views
0 comments
0 upvotes
Software Developer
3 rounds | 6 problems
Interviewed by Infineon Technologies
676 views
0 comments
0 upvotes
Product Engineer
3 rounds | 5 problems
Interviewed by Squadstack
1490 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Mindtree
10533 views
7 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
6579 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
7862 views
1 comments
0 upvotes