Add office photos
Kellton logo
Engaged Employer

Kellton

Verified
2.8
based on 378 Reviews
Video summary
Filter interviews by
Software Engineer
Fresher
Skills
Clear (1)

Kellton Software Engineer Interview Questions and Answers

Updated 5 Feb 2024

Q1. Find All Pairs Adding Up to Target

Given an array of integers ARR of length N and an integer Target, your task is to return all pairs of elements such that they add up to the Target.

Input:

The first line conta...read more
Ans.

The task is to find all pairs of elements in an array that add up to a given target.

  • Iterate through the array and for each element, check if the target minus the element exists in a hash set.

  • If it exists, add the pair to the result. If not, add the element to the hash set.

  • Handle cases where the same element is used twice to form a pair.

  • If no pair is found, return (-1, -1) for that test case.

View 1 answer
right arrow

Q2. Kth Largest Element Problem

Given an array containing N distinct positive integers and a number K, determine the Kth largest element in the array.

Example:

Input:
N = 6, K = 3, array = [2, 1, 5, 6, 3, 8]
Output...read more
Ans.

Find the Kth largest element in an array of distinct positive integers.

  • Sort the array in non-increasing order and return the Kth element.

  • Ensure all elements in the array are distinct.

  • Handle multiple test cases efficiently.

Add your answer
right arrow
Kellton Software Engineer Interview Questions and Answers for Freshers
illustration image

Q3. Maximum Subarray Sum Problem Statement

Given an array arr of length N consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.

Explanation:

A sub...read more

Ans.

Find the sum of the subarray with the maximum sum among all subarrays in an array of integers.

  • Iterate through the array and keep track of the maximum sum subarray seen so far.

  • At each index, decide whether to include the current element in the subarray or start a new subarray.

  • Update the maximum sum subarray if a new maximum is found.

  • Consider edge cases like all negative numbers in the array.

  • Example: For input arr = [-2, 1, -3, 4, -1], the maximum subarray sum is 4.

Add your answer
right arrow

Q4. Max Length of Same Indexed Subarrays Problem

Given two integer arrays A and B, and an integer C, the goal is to determine the maximum possible length K of the same indexed subarrays. The condition is that the s...read more

Ans.

Find the maximum length of same indexed subarrays based on given conditions.

  • Iterate through the arrays to find the maximum length of same indexed subarrays.

  • Calculate the sum of subarrays from A and B, and check if the condition is met.

  • Return the maximum length that satisfies the condition.

Add your answer
right arrow
Discover Kellton interview dos and don'ts from real experiences

Q5. Distinct Subsequences Problem Statement

You are given a string 'S' of length 'N' which may include duplicate alphabets. Your goal is to calculate the number of distinct subsequences in the string.

Example:

Inpu...read more
Ans.

Calculate the number of distinct subsequences in a string with possible duplicates.

  • Iterate through the string and keep track of the count of each character.

  • Use dynamic programming to calculate the number of distinct subsequences.

  • Consider the cases where a character is included or excluded in the subsequence.

  • Modulo the final count by 10^9 + 7 to handle large answers.

Add your answer
right arrow

Q6. Minimum Number of Swaps to Sort an Array

Find the minimum number of swaps required to sort a given array of distinct elements in ascending order.

Input:

T (number of test cases)
For each test case:
N (size of the...read more
Ans.

The minimum number of swaps required to sort a given array of distinct elements in ascending order.

  • Use a graph-based approach to find cycles in the array

  • Count the number of swaps needed to fix each cycle

  • Sum up the swaps needed for all cycles to get the total minimum swaps

Add your answer
right arrow

Q7. Divide Chocolates Problem Statement

Ninja bought chocolate consisting of several chunks, and the sweetness of each chunk is represented in an array ARR. He wants to divide the chocolate into K + 1 parts (cuts),...read more

Ans.

The task is to maximize the total sweetness of the part that Ninja will get by dividing chocolates into K + 1 parts.

  • Iterate through all possible cuts to find the maximum sweetness Ninja can obtain.

  • Keep track of the minimum sweetness in each part after the cut.

  • Return the maximum of these minimum sweetness values as the result.

Add your answer
right arrow

Q8. Partition to K Equal Sum Subsets Problem

Given an array of integers and a positive integer 'K', determine if it is possible to divide the array into 'K' non-empty subsets such that the sum of elements in each s...read more

Ans.

The problem involves dividing an array into K subsets with equal sum.

  • Use backtracking to try all possible combinations of dividing the array into K subsets

  • Keep track of the sum of elements in each subset and check if they are equal to the target sum

  • Optimize by sorting the array in descending order before starting the backtracking process

Add your answer
right arrow

Q9. Count Subsequences Problem Statement

Given an integer array ARR of size N, your task is to find the total number of subsequences in which all elements are equal.

Explanation:

A subsequence of an array is derive...read more

Ans.

Count the total number of subsequences in which all elements are equal in an integer array.

  • Iterate through the array and count the frequency of each element.

  • Calculate the total number of subsequences for each element using the formula (frequency * (frequency + 1) / 2).

  • Sum up the total number of subsequences for all elements and return the result modulo 10^9 + 7.

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Kellton Software Engineer

based on 3 interviews
2 Interview rounds
Coding Test Round - 1
Coding Test Round - 2
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

Apexon Logo
3.3
 • 10 Interview Questions
View all
Recently Viewed
SALARIES
La Net Team Software Solutions
SALARIES
La Net Team Software Solutions
INTERVIEWS
Kansai Nerolac Paints
No Interviews
INTERVIEWS
Advik Hi Tech
No Interviews
CAMPUS PLACEMENT
Veer Narmad South Gujarat University (VNSGU)
INTERVIEWS
Planet Spark
No Interviews
INTERVIEWS
Pidilite Industries
No Interviews
INTERVIEWS
Advik Hi Tech
No Interviews
INTERVIEWS
Advik Hi Tech
No Interviews
INTERVIEWS
Kellton
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

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