# 860

Sde1 interview questions shared by candidates

## Top Interview Questions

Sort: Relevance|Popular|Date

Coding questions with sorting algorithms,two pointers, missing number etc

Can you please tell some more questions which were asked in groww interview

no

### if abc = zab then can = ?

bzm

bzm =&gt;taking prev char

xca

### 1. find the first repeated word in a string 2. merge 2 sorted arrays 3 slot machine

Here's my rather straight forward java solution to #1: public static String firstRepeatedWord(String s){ String[] words = s.toLowerCase().split(" "); Map map = new HashMap(); for(String word:words){ if(!map.containsKey(word)) map.put(word, 1); else return word; } return s; } Less

Update-- hashmap uses a key of type String, and value of type Integer

I realize it is unnecessary to use hashmap, one could simply use an arraylist.

### Basic programming questions.

I solved them.

Can you specify the difficulty level of the questions?

### Given list of bag, each bag has its weight and value. You have a maximum weight to carry. Find the bag that are the most valuable and the sum of weight should be lower than your limit.

Dynamic programming

Sounds like the classic 0-1 knapsack problem.

### Given a matrix sorted row wise and column wise, find an element in it

I gave two approaches, one was in O(nlogn) and the other in O(n) which took a bit of time for me to figure out the features of this kind of matrix Less

I thought about the matrix &amp; realized that if the number you need to search, is greater than a number in the matrix, then it would be either on the right, or down to it in the matrix The approach is to do binary search on the diagonal (0,0 to n,n diagonal) &amp; then search between the quadruplet (4 numbers) Less

### You are given a m by n grid. There is one character in each cell. You need to find all words in the grid.

Depth first searching problem.

Word Search or Word Search II on LeetCode.

### How do you determine a number is a power of ten.

number mod 10 == 0 although 10^0 is a tricky case

# starts with a '1' and ends with 1 or more '0's

### ML, algorithm, OOA/D, java questions

didn't algorithms questions well

Can you please let me know what are the kind of questions asked in the phone interview. Less