Wheelseye SDE1 interview

wheelseye logo
wheelseye
SDE I
June 12, 20255 reads

Summary

I experienced a Data Structures and Algorithms round for the SDE1 role at Wheelseye, which included two specific coding challenges.

Full Experience

First Round(DSA):
Question 1: You have given an array of fruits with frequencies in a specific order. We need to give all the possible arrangements of these fruits in such a way that
same fruits are not adjacent and
all fruits should be consumed

Input: nums = [2,1,2] (M, O, A)


Output:
M O A M A
M A M O A
M A M A O
M A O M A
M A O A M
O M A M A
O A M A M
A M O M A
A M O A M
A M A M O
A M A O M
A O M A M

Question 2:
2-d array which is sorted both row wise and column wise, find the target element in the given array ?

{10, 20, 30, 40},
{15, 25, 35, 45},
{27, 29, 37, 48},
{32, 33, 39, 50}

Target = 33

Interview Questions (2)

Q1
Arrange Fruits with No Adjacent Same Fruits
Data Structures & Algorithms

You have given an array of fruits with frequencies in a specific order. We need to give all the possible arrangements of these fruits in such a way that
same fruits are not adjacent and
all fruits should be consumed

Input: nums = [2,1,2] (M, O, A)


Output:
M O A M A
M A M O A
M A M A O
M A O M A
M A O A M
O M A M A
O A M A M
A M O M A
A M O A M
A M A M O
A M A O M
A O M A M

Q2
Search in a Row-Column Sorted 2D Matrix
Data Structures & Algorithms

2-d array which is sorted both row wise and column wise, find the target element in the given array ?

{10, 20, 30, 40},
{15, 25, 35, 45},
{27, 29, 37, 48},
{32, 33, 39, 50}

Target = 33

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!