Trace code and find frequent character | Akuna Capital
|Home/Coding & Algorithms/Akuna Capital
Trace code and find frequent character
Akuna Capital
Aug 1, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
0
0
Trace a simple algorithm: Given a short loop-and-conditional pseudo-code operating over an integer array, trace the values of key variables (e.g., index, current element, running best, counters) after each iteration for a provided input and state the final result. Also identify the time and space complexity and any off-by-one errors.
String frequency: Given a string of letters (case-insensitive), return the character that appears most frequently; if there is a tie, return the lexicographically smallest among them. Provide an O(n) approach and discuss space trade-offs.