Associate Software Engineer

1500+ Associate Software Engineer Interview Questions and Answers

Updated 15 Dec 2024

Popular Companies

search-icon
Q1. Triplets with Given Sum

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a...read more

Frequently asked in,
Q2. Best time to buy and sell stock II

You have been given stock values/prices for N number of days. Every i-th day signifies the price of a stock on that day. Your task is to find the maximum profit which you can m...read more

Associate Software Engineer Interview Questions and Answers for Freshers

illustration image
Q3. Intersection of Two Arrays II

You have been given two integer arrays/list(ARR1 and ARR2) of size N and M, respectively. You need to print their intersection; An intersection for this problem can be defined when...read more

Q4. Frog Jump

There is a frog on the 1st step of an N stairs long staircase. The frog wants to reach the Nth stair. HEIGHT[i] is the height of the (i+1)th stair.If Frog jumps from ith to jth stair, the energy lost i...read more

Are these interview questions helpful?
Q5. Connect N Ropes With Minimum Cost

You have been given 'N' ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to sum of their lengths. We need to conn...read more

Ans.

The problem is to connect N ropes of different lengths into one rope with minimum cost.

  • Sort the array of rope lengths in ascending order.

  • Initialize a variable to keep track of the total cost.

  • While there are more than one rope remaining, take the two shortest ropes and connect them.

  • Add the cost of connecting the two ropes to the total cost.

  • Replace the two shortest ropes with the connected rope.

  • Repeat the above steps until only one rope remains.

  • Return the total cost as the mini...read more

Q6. Minimum number of swaps required to sort an array

You have been given an array 'ARR' of 'N' distinct elements.

Your task is to find the minimum no. of swaps required to sort the array.

For example:
For the given...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop
Q7. Ninja And Alternating Largest

Ninja is given a few numbers, and he is being asked to rearrange the numbers so that every second element is greater than its left and right element.

Suppose the given array is [1, ...read more

Ans.

The task is to rearrange the given array such that every second element is greater than its left and right element.

  • Read the number of test cases

  • For each test case, read the number of elements in the array and the array elements

  • Iterate through the array and swap elements at odd indices with their adjacent elements if necessary

  • Check if the rearranged array satisfies the conditions and print 1 if it does, else print 0

Q8. Smallest Number With At least N Trailing Zeros In Factorial

You are given a positive integer N. Your task is to find the smallest number whose factorial contains at least N trailing zeroes.

Example :
Let N = 1. ...read more

Associate Software Engineer Jobs

Sr. Associate Software Engineer-Claims 5-9 years
Duck Creek Technologies
4.5
Mumbai
Associate Software Engineer (.Net) 3-8 years
Maersk Global Service Centres India Pvt. Ltd.
4.3
Bangalore / Bengaluru
Associate Software Engineer - Embedded Testing 1-4 years
Maxim India Integrated Circuit Design Pvt Ltd.
4.4
Bangalore / Bengaluru
Q9. Armstrong Number

You are given an integer ‘NUM’ . Your task is to find out whether this number is an Armstrong number or not.

A k-digit number ‘NUM’ is an Armstrong number if and only if the k-th power of each d...read more

Q10. Intersection of Linked List

You are given two Singly Linked List of integers, which are merging at some node of a third linked list.

Your task is to find the data of the node at which merging starts. If there is...read more

Frequently asked in,
Q11. Kth Smallest and Largest Element of Array

You are given an array ‘Arr’ consisting of ‘N’ distinct integers and a positive integer ‘K’. Find out Kth smallest and Kth largest element of the array. It is guaranteed...read more

Q12. Maximum Sum Subsequenc

You are given an array “NUMS” consisting of N integers and an integer, K. Your task is to determine the maximum sum of an increasing subsequence of length K.

Note:
1. The array may contain...read more
Q13. Reverse Linked List

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked li...read more
Frequently asked in, ,
Q14. Check If The String Is A Palindrome

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols ...read more

Q15. Add K Nodes

You are given a Singly Linked List of integers and an integer 'K'.

Your task is to modify the linked list by inserting a new node after every 'K' node in the linked list with the node value being equ...read more

Q16. Longest Common Prefix After Rotation

You are given two strings 'A' and 'B' where string 'A' is fixed. But you can perform left shift operations on string B any number of times.

Your task is to find out the minim...read more

Ans.

The question asks to find the minimum number of left shift operations required to obtain the longest common prefix of two given strings.

  • Perform left shift operations on string B to find the longest common prefix with string A

  • Count the number of left shift operations required to obtain the longest common prefix

  • Return the minimum number of left shift operations for each test case

Q17. Tiling Problem

You have been given a board where there are '2' rows and 'N' columns. You have an infinite supply of 2x1 tiles, and you can place a tile in the following ways:

1. Horizontally as 1x2 tile 2. Verti...read more
Q18. Pair Sum

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair shou...read more
Q19. Combination Sum

You have been given three numbers ‘X’, ’Y’ and ‘Z’. You have to find the sum of all the numbers formed by the combination of the digits 3, 4 and 5. You can use 3 at most ‘X’ times, 4 at most ‘Y’ ...read more

Q20. Equilibrium Index

You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.

An index is considered as an equilibrium index if the sum of elements of the array to t...read more

Q21. First Repeated Character

You are given a string 'STR' of lowercase English alphabets. You need to find the repeated character present first in the string.

Example:
If the string is: “abccba”, then the first repe...read more
Q22. Puzzle Question

Which number would replace the underline marked in the series 20, 40,100, ...., 820?

Q23. Reverse Stack Using Recursion

Reverse a given stack of integers using recursion.

Note:

You are not allowed to use any extra space other than the internal stack space used due to recursion. You are not allowed to...read more
Q24. Shortest Distance

Ninjaland is a country consisting of ‘N’ states and ‘M’ paths. There are two types of paths that connect any two states. One is the normal path, and the other is a special path. Both paths have...read more

Q25. Sort By Kth Bit

You are given an array/list ‘ARR’ of ‘N’ positive integers and an integer ‘K’. Your task is to group all the array elements with ‘K-th’ bit (rightmost bit is ‘1st’ bit) equal to 0 followed by all...read more

Q26. Balanced parentheses

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditi...read more
Q27. Chocolate Problem

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the t...read more

Frequently asked in,
Q28. Palindromic Substrings

You have been given a string STR. Your task is to find the total number of palindromic substrings of STR.

Example :
If the input string is "abbc", then all the possible palindromic substri...read more
Q29. All prime numbers

Given an integer N, print all the prime numbers that lie in the range 2 to N (both inclusive).

Input Format :
Integer N 
Output Format :
Prime number...read more
Q30. Occurrence Of Each Word

You are given a string S of words. Your task is to count the occurrence of each word present in the string S. A word is a sequence of one or more non-space characters, and there can be mu...read more

Q31. You are a team leader and one of your employee is unable to complete his/her work on time and due to him you are unable to submit the work before the deadline to your senior. How will you make that employee wor...

read more
Ans.

As a team leader, I would identify the reason for the delay and work with the employee to find a solution to complete the work on time.

  • Have a one-on-one meeting with the employee to understand the reason for the delay

  • Identify any roadblocks or challenges the employee is facing and work together to find a solution

  • Set clear expectations and deadlines for the employee to complete the work

  • Provide support and resources to help the employee complete the work on time

  • Regularly check ...read more

Q32. Anagram Pairs

Pre-requisites: Anagrams are defined as words or names that can be formed by rearranging letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "r...read more

Q33. Middle Of Linked List

Given the head node of the singly linked list, return a pointer pointing to the middle of the linked list.

If there are an odd number of elements, return the middle element if there are ev...read more

Q34. One of the questions for Critical Reasoning was:- Two cars A and B cross a flyover in 10 minutes and 30 minutes respectively. Find the speed of Car A. Statements: Car B travels at the 50kmph Train A and B are t...

read more
Ans.

Car A's speed is 90kmph

  • Use the formula: Speed = Distance/Time

  • Assume the distance to be the same for both cars

  • Calculate Car A's time using the given information

  • Substitute the values in the formula to get Car A's speed

Q35. Sub Sort

You are given an integer array ‘ARR’. You have to find the length of the shortest contiguous subarray such that, if you sort this subarray in ascending order, then the whole array will be sorted in asce...read more

Ans.

The question asks to find the length of the shortest contiguous subarray that needs to be sorted in order to sort the whole array.

  • Iterate through the array and find the first element that is out of order from the left side.

  • Iterate through the array and find the first element that is out of order from the right side.

  • Find the minimum and maximum element within the subarray from the above steps.

  • Expand the subarray from both sides until all elements within the subarray are in the...read more

Q36. Longest Path In Directed Graph

You are given a Weighted Directed Acyclic Graph (DAG) consisting of ‘N’ nodes and ‘E’ directed edges. Nodes are numbered from 0 to ’N’-1. You are also given a source node ‘Src’ in ...read more

Q37. Job Sequencing Problem

You are given a N x 2 2-D array 'Jobs' of 'N' jobs where Jobs[i][0] denote the deadline of i-th job and Jobs[i][1] denotes the profit associated with i-th job.

You will make a certain prof...read more

Q38. Largest BST subtree

You are given a binary tree with 'N' nodes. Your task is to return the size of the largest subtree of the binary tree which is also a BST.

A binary search tree (BST) is a binary tree data str...read more

Q39. Power Set

You are given a sorted array of 'N' integers. You have to generate the power set for this array where each subset of this power set is individually sorted.

A set is a well-defined collection of distinc...read more

Q40. Prime time again

You have been given two integers ‘DAY_HOURS’ and ‘PARTS’. Where ‘DAY_HOURS’ is the number of hours in a day and a day can be divided into ‘PARTS’ equal parts. Your task is to find total instance...read more

Q41. First Unique Character in a String

Given a string ‘STR’ consisting of lower case English letters, the task is to find the first non-repeating character in the string and return it. If it doesn’t exist, return ‘#...read more

Q42. Implement Atoi Function

Given a string ‘STR’ of length 'N'. Implement the atoi function. If there are no numbers in the string, return 0.

In other words, given a string ‘STR’ convert the string to an integer.

Ex...read more

Q43. Pythagorean Triplets

You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.

An array is said to have a pythagorean triplet if there exists thr...read more

Q44. Move All Negative Numbers To Beginning And Positive To End

You are given an array 'ARR' consisting of 'N' integers. You need to rearrange the array elements such that all negative numbers appear before all posit...read more

Q45. Longest Palindromic Substring

Given a string ’S’ consisting of lower case English letters, you are supposed to return the longest palindromic substring of ‘S’.

Note that in case of more than one longest palindro...read more

Q46. Merge Sort

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm - Merge sort is a Div...read more
Q47. N-th Term Of GP

You are given the first term (A), the common ratio (R) and an integer N. Your task is to find the Nth term of the GP series.

The general form of a GP(Geometric Progression) series is A, A(R), A(R...read more

Q48. Number And Digits

You are given a positive number ‘N.’ You need to find all the numbers such that the sum of digits of those numbers to the number itself is equal to ‘N.’

For example:
You are given ‘N’ as 21, th...read more
Q49. Spiral Order Traversal of a Binary Tree

You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

For example
For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1,...read more
Frequently asked in,
Q50. Minimum Direction Changes

Given a 2D grid having N Rows and M Columns. Each cell of the grid has a character among [ 'U', 'L', 'D', 'R' ] written on it, denoting Up, Left, Down, and Right respectively and indic...read more

1
2
3
4
5
6
7
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10k Interviews
3.9
 • 7.8k Interviews
3.8
 • 4.6k Interviews
3.6
 • 3.7k Interviews
3.7
 • 791 Interviews
3.4
 • 771 Interviews
3.8
 • 513 Interviews
4.0
 • 468 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Associate Software Engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter