Pergunta de entrevista da empresa Micro1

1. First round is about past experience, behavioral questions, some tech questions. 2. Coding round with easy leetcode question, given string "abc#d#e", and if you see # it means letter before should be deleted. 3. Again interview with AI where you answering questions about specific top 3 skills you mentioned (let's say, JS, Python, Go). AI giving you questions for each topic. 4, Again coding round, this time question is a bit harder, around easy+/medium leetcode. Question was: given the array[Map] for instance {[content, timestamp],[content, timestamp],[content, timestamp]}, N which is the window, and latestTimestamp, you should first in your output include the messages within window N, and make sure if content of message is duplicated, return the latest one.

Resposta da entrevista

Sigiloso

26 de mar. de 2025

#include #include using namespace std; string processString(string s) { stack st; for (char ch : s) { if (ch == '#' && !st.empty()) { st.pop(); // Remove previous character } else if (ch != '#') { st.push(ch); } } // Build the result string string result = ""; while (!st.empty()) { result = st.top() + result; st.pop(); } return result; } int main() { string input = "abc#d#e"; cout << "Processed String: " << processString(input) << endl; return 0; }