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

Java Developer

Zycus
upvote
share-icon
2 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, DBMS, OOPS, Operating System
Tip
Tip

Tip 1: Must do Previously asked Interviews as well as Online Test Questions.
Tip 2: Must have good knowledge of DSA
Tip 3: Do at least 2 good projects and you must know every bit of them.

Application process
Where: Other
Eligibility: Above 7 CGPA, Good Knowledge of Java
Resume Tip
Resume tip

Tip 1: Have at least 2 good projects explained in short with all important points covered.
Tip 2: Every skill must be mentioned.
Tip 3: Focus on skills, projects, and experiences more.

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 mins
Interview date8 Feb 2022
Coding problem3

Online Test was conducted on HackerEarth with a test duration of 90 minutes with 3 coding questions being asked.

1. Rat In A Maze

Easy
15m average time
85% success
0/40
Asked in companies
OlaIBMGoldman Sachs

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination. The rat's destination is at ('N' - 1, 'N' - 1). Your task is to find all the possible paths that the rat can take to reach from source to destination in the maze. The possible directions that it can take to move in the maze are 'U'(up) i.e. (x, y - 1) , 'D'(down) i.e. (x, y + 1) , 'L' (left) i.e. (x - 1, y), 'R' (right) i.e. (x + 1, y).

Note:
Here, sorted paths mean that the expected output should be in alphabetical order.
For Example:
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1 
Expected Output:
DDRDRR DRDDRR 
i.e. Path-1: DDRDRR and Path-2: DRDDRR

The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
Problem approach

Create a solution matrix, initially filled with 0’s.
Create a recursive function, which takes initial matrix, output matrix and position of rat (i, j).
if the position is out of the matrix or the position is not valid then return.
Mark the position output[i][j] as 1 and check if the current position is destination or not. If destination is reached print the output matrix and return.
Recursively call for position (i+1, j) and (i, j+1).
Unmark position (i, j), i.e output[i][j] = 0.

Try solving now

2. Spiral Matrix

Easy
0/40
Asked in companies
ZycusTSYS- Global Payments

You are given a 2D matrix ‘MATRIX’ of ‘N’*’M’ dimension. You have to return the spiral traversal of the matrix.

Example:

Input:
MATRIX = [ [1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60] ]
Output:
1 3 5 7 20 60 34 30 23 10 11 16

Explanation: Starting from the element in the first row and the first column, traverse from left to right (1 3 5 7), then top to bottom (20 60), then right to left (34 30 23), then bottom to up (10) and then left to right (11 16).
Problem approach

create a DFS function that takes matrix, cell indices, and direction
checks are cell indices pointing to a valid cell (that is, not visited and in bounds)? if not, skip this cell
print cell value
mark matrix cell pointed by indicates as visited by changing it to a value not supported in the matrix
check are surrounding cells valid? if not stop the algorithm, else continue
if the direction is given right then check, if the cell to the right is valid. if so, DFS to the right cell given the steps above, else, change the direction to down and DFS downwards given the steps above
else, if the direction given is down then check, if the cell to the down is valid. if so, DFS to the cell below given the steps above, else, change the direction to left and DFS leftwards given the steps above
else, if the direction given is left then check, if the cell to the left is valid. if so, DFS to the left cell given the steps above, else, change the direction to up and DFS upwards given the steps above
else, if the direction given is up then check, if the cell to the up is valid. if so, DFS to the upper cell given the steps above, else, change the direction to right and DFS rightwards given the steps above

Try solving now

3. Pairwise Sum of Hamming Distance

Moderate
30m average time
70% success
0/80
Asked in companies
ZycusGoogle inc

You are given an array ARR having N integers. Your task is to find the sum of Hamming Distance for each pair of the array elements.

Hamming Distance for two given integers 'A' and 'B' is defined as the minimum number of bits that needs to be toggled to make both the integers equal.

For example:

Consider A=4 and B=7
Binary representation of 4 = 100
Binary representation of 7 = 111
For the given example, if we flip the values of the last two least significant bits of A to 1 then A will become 7. As we can change the value of A to B by 2 flips. Therefore the Hamming Distance, in this case, is 2.
Problem approach

Using Bit Manipulation

Try solving now
02
Round
Medium
Video Call
Duration60 mins
Interview date11 Feb 2022
Coding problem4

More focus was to test logical think and coding Skills so puzzles and Dsa was the main focus here.

1. Puzzle

How do we measure forty-five minutes using two identical wires, each of which takes an hour to burn? We have matchsticks with us. The wires burn non-uniformly. So, for example, the two halves of wire might burn in 10 minutes and 50 minutes respectively

Problem approach

Tip 1: Be well prepared for puzzles for this company
Tip 2: Think of all the possible cases.
Tip 3: Prepare for previously asked questions.

2. Puzzle

There is an 8 by 8 chessboard in which two diagonally opposite corners have been cut off. You are given 31 dominos, and a single domino can cover exactly two squares. Can you use the 31 dominos to cover the entire board? 

Problem approach

Tip 1: Be well prepared for puzzles for this company
Tip 2: Think of all the possible cases.
Tip 3: Prepare for previously asked questions.

3. Subsequences of String

Moderate
15m average time
85% success
0/80
Asked in companies
Chegg Inc.Expedia GroupQuikr

You are given a string 'STR' containing lowercase English letters from a to z inclusive. Your task is to find all non-empty possible subsequences of 'STR'.

A Subsequence of a string is the one which is generated by deleting 0 or more letters from the string and keeping the rest of the letters in the same order.
Problem approach

Initialize the pointers i and j with zero, where i is the pointer to str1 and j is the pointer to str2.
If str1[i] = str2[j] then increment both i and j by 1.
Otherwise, increment only j by 1.
If i reaches the end of str1 then return TRUE else return FALSE.

Try solving now

4. Merge Two Sorted Arrays Without Extra Space

Moderate
0/80
Asked in companies
ZycusFareye Technologies Private Limited

Given two non-decreasing sorted arrays, ‘A’ and ‘B’, having ‘N’ and ‘M’ elements, respectively.


You must merge these arrays, ‘A’ and ‘B’, into a sorted array without using extra space. Of all the 'N + M' sorted elements, array 'A' should contain the first 'N' elements, and array 'B' should have the last 'M' elements.


Note:
You must perform the merge operation in place and must not allocate any extra space to merge the two arrays.
For example:
When ‘N’ = 4, ‘A’ = {1, 4, 5, 7} and ‘M’ = 3, ‘B’ = {2, 3, 6}. 
We can merge these two arrays into {1, 2, 3, 4, 5, 6, 7} (The elements of ‘A’ are {1, 2, 3, 4} ).
Hence, the answer is {1, 2, 3, 4, 5, 6, 7}.
Problem approach

Let first array be mPlusN[] and other array be N[]
1) Move m elements of mPlusN[] to end.
2) Start from nth element of mPlusN[] and 0th 
element of N[] and merge them into mPlusN[].

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

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
960 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
Java Developer
3 rounds | 4 problems
Interviewed by SAP Labs
3148 views
0 comments
0 upvotes