Today was my Microsoft R1 (DSA) interview for an SSE role.
It didn’t go well. I couldn’t solve the questions.
But instead of hiding it, I’m documenting everything in detail so others can prepare better. If this helps even one person crack it, it’s worth it.
Given a positive integer N, return the immediate next greater number that can be formed using the same digits.
If no such number exists, return the same number.
Input: 123
Output: 132
Input: 321
Output: 321 (no bigger permutation exists)
Input: 115
Output: 151
Input: 218765
Output: 251678
Input: 534976
Output: 536479115 → 151987 → 9877 → 7Write a function ftoa() that converts a given floating-point number to a string without using standard library conversion functions.
You are given:
numprecision (number of digits after decimal)Return the string representation of the number up to the given precision.
ftoa(num, precision) -> stringInput: num = 1.555, precision = 2
Output: "1.55"
Input: num = 1.555, precision = 0
Output: "1"
Input: num = 123.4, precision = 3
Output: "123.400"
Input: num = -12.3456, precision = 2
Output: "-12.34"Number manipulation
Handling floating precision manually
Attention to detail
Ability to break problem into:
Yes, I failed this round.
But I’m not stopping here.
I have my next round scheduled, and I’ll show up again—better prepared, more aware, and mentally stronger.
If you’re preparing for Microsoft:
👉 Don’t just solve problems — simulate interviews
👉 Don’t just read solutions — explain them out loud
👉 Don’t avoid failure — learn from it fast
This is just one bad round. Not the end.
See you on the other side 💯