Medium ✔
- Sort Characters by Frequency
- 05 March, 2026: 00.07.23 ❌
- Failed at implementation(sort function), approach was right
- Place two operats of container types, the following is used for a container of
pair<int, int>type, which one you want first, keep that at first during comparison[](pair<int, int> a, pair<int, int> b) {
return a.second > b.second;
});
- 30 March, 2026: 00.17.43 ❌
- Failed at implementation(string building), approach was right
string(count, char)create a string with givencharlength ofcount
- 05 March, 2026: 00.07.23 ❌
- Maximum Nesting Depth of the Parentheses
- 17 March, 2026: 00.01.12 ❌
- Failed at implmentation
- Depth of the Parentheses count by increasing for
(and decreasing)
- 30 March, 2026: 00.02.14 ✔
- 17 March, 2026: 00.01.12 ❌
- Roman to Integer
- 05 March, 2026: 00.14.17 ✔
- 30 March, 2026: 00.16.22 ✔
- String to Integer (atoi)
- 21 March, 2026: 00.22.46 ❌
- Failed at implementation
- Remove the leading whitespace manually(just extract the correct index).
- Handle the overflow and both (
+and-) sign
- 30 March, 2026: 00.17.54 ✔
- your handle overflow even after storing it
- Remove only the leading whitespace
- Then check for digit and alpha numeric charecter
- 21 March, 2026: 00.22.46 ❌
- Sum of Beauty of All Substrings
- 27 March, 2026: 00.17.13 ❌
- Failed at intitution
Substring Frequencies Max Min Beauty a a=1 1 1 0 aa a=2 2 2 0 aab a=2, b=1 2 1 1 aabc a=2, b=1, c=1 2 1 1 aabcb a=2, b=2, c=1 2 1 1 aabcba a=3, b=2, c=1 3 1 2 aabcbaa a=4, b=2, c=1 4 1 3 a a=1 1 1 0 ab a=1, b=1 1 1 0 abc a=1, b=1, c=1 1 1 0 abcb a=1, b=2, c=1 2 1 1 abcba a=2, b=2, c=1 2 1 1 abcbaa a=3, b=2, c=1 3 1 2 b b=1 1 1 0 bc b=1, c=1 1 1 0 bcb b=2, c=1 2 1 1 bcba b=2, c=1, a=1 2 1 1 bcbaa b=2, c=1, a=2 2 1 1 c c=1 1 1 0 cb c=1, b=1 1 1 0 cba c=1, b=1, a=1 1 1 0 cbaa c=1, b=1, a=2 2 1 1 b b=1 1 1 0 ba b=1, a=1 1 1 0 baa b=1, a=2 2 1 1 a a=1 1 1 0 aa a=2 2 2 0 a a=1 1 1 0
- Failed at intitution
- 30 March, 2026: 00.17.44 ❌
- Inner loop generate substring, each iteration in inner loop generate a new substring, so calcualte the freq for each iteration in inner loop
- 27 March, 2026: 00.17.13 ❌
- Reverse every word in a string