
ZeMoSo Technologies

ZeMoSo Technologies Associate Software Engineer Interview Questions and Answers
Q1. Ninja and Alternating Largest Problem Statement
Ninja is given a sequence of numbers and needs to rearrange them so that every second element is greater than its neighbors on both sides.
Example:
Input:
[1, 2, ...read more
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
Q2. Longest Common Prefix After Rotation
You are given two strings 'A' and 'B'. While string 'A' is constant, you may apply any number of left shift operations to string 'B'.
Explanation:
Your task is to calculate ...read more
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
Q3. Sub Sort Problem Statement
You are given an integer array ARR
. Determine the length of the shortest contiguous subarray which, when sorted in ascending order, results in the entire array being sorted in ascendi...read more
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
Q4. Given a Map of fruits with there price as a key value pair respectively, find the fruit whose price is maximum using Java 8 Stream API.
Using Java 8 Stream API to find the fruit with maximum price in a Map of fruits.
Use entrySet() method to get a stream of key-value pairs from the Map.
Use max() method with Comparator.comparing() to find the entry with maximum price.
Extract the key (fruit) from the entry with maximum price.
Q5. Write a program to check whether the parenthesis are properly balanced or not, means for every opening brace these should be a closing brace present.
Program to check if parenthesis are properly balanced
Use a stack data structure to keep track of opening parenthesis
Iterate through the input string and push opening parenthesis onto the stack
When a closing parenthesis is encountered, pop from the stack and check if it matches the corresponding opening parenthesis
If stack is empty at the end and all parenthesis are matched, then the input has properly balanced parenthesis
Q6. Given a list of integer find the first non repeating integer using stream API of Java 8.
Find the first non-repeating integer in a list using Java 8 stream API.
Use Java 8 stream API to group integers by count
Filter out integers with count greater than 1
Return the first non-repeating integer
Q7. Implent Oops concept of Java through code
Java OOPs concepts can be implemented using classes, objects, inheritance, polymorphism, and encapsulation.
Create classes with attributes and methods
Instantiate objects from classes
Use inheritance to create subclasses
Implement polymorphism through method overriding
Encapsulate data using access modifiers
Q8. A variant of bubble sort
Cocktail sort is a variant of bubble sort that sorts in both directions.
Also known as bidirectional bubble sort or shaker sort.
It starts with the first element and compares it with the next one, swapping if necessary.
Then it moves to the last element and compares it with the previous one, swapping if necessary.
It continues until no more swaps are needed.
It is more efficient than bubble sort for large lists with many out-of-order elements.
Interview Process at ZeMoSo Technologies Associate Software Engineer

Top Associate Software Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

