Microsoft | SDE 2 | Azure Compute | Hyderabad | March 2021 | Rejected
Anonymous User
950

Status: Tier 3 college
Exp : 4 years product based MNC
Position: Azure Compute Team
Location: Hyd, India

Onsite Round 1 :
1. There were two interviewers where one was actively asking questions and other one was passive and didn't ask single question.
2. He was 10+ years of Experience and told that he is a beginner as a Interviewer.
3. He started asking basic questions related to my previous projects and tech stack.
4. He asked me to design an API WordBag where two methods are exposed.
5. AddWord : It adds a word into the bag.
6. RemoveWord : It remove a word from the bag.
7. Use datastructure with static size.
8. As i was trying to optimise implementation by using map or set considering future requirements usage. He asked me not to bother about optimisation. As for now, He asked me to use array to store strings for simplicity.

I implemented below code.

class WordBag {
String[] words;
int size;
int emptySlots;
public WordBag(int size) {
    this.size = size;
    emptySlots = size;
    words = new String[size];
}

public void addWord(String word) throws Exception {
    if (emptySlots == 0) return throw new Exception("size is full");
    if (word == null || word.isEmpty()) return throw new Exception("word is not correct format");
    
    for (int i = 0; i < size; i++) {
        if (words[i] == null) {
            words[i] = word;
			emptySlots--;
            break;
        }
    }
}
 
public boolean removeWord(String word) {
    for(int i = 0; i < size; i++) {
        if (words[i] != null && words[i].equals(word)) {
            words[i] = null;
			emptySlots++;
            return true;
        }
    }
    return false;
}

}

He was interested in :

  1. How would you handle not vualid cases?
  2. How would you handle exceptions?
  3. In the end, he dicussed half an hour on basic testing cases.
  4. He was interested to write testcases in such a way that all test cases can run (print Pass or Fail on the console )in one go. similar to junit framework.

From my point of view, it was a negative experience overall. He didn't discuss anything on code, complexity, optimizations, scalability etc.

What is your view on it?
How is your experience for this team?

HR : rejected saying that performance is not as per standard.

Comments (1)