PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Akuna Capital

Trace code and find frequent character

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency in algorithm tracing and debugging loop-and-conditional logic (including off-by-one detection), analysis of time and space complexity, and string-processing skills such as frequency counting with case-insensitivity and lexicographic tie-breaking.

  • Medium
  • Akuna Capital
  • Coding & Algorithms
  • Software Engineer

Trace code and find frequent character

Company: Akuna Capital

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Take-home Project

1) 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. 2) 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.

Quick Answer: This question evaluates proficiency in algorithm tracing and debugging loop-and-conditional logic (including off-by-one detection), analysis of time and space complexity, and string-processing skills such as frequency counting with case-insensitivity and lexicographic tie-breaking.

Related Interview Questions

  • Find minimum swaps to sort array with duplicates - Akuna Capital (hard)
  • Heapify an array into a max-heap - Akuna Capital (Medium)
  • Implement a ring buffer - Akuna Capital (Medium)
  • Compute max profit across dated stock quotes - Akuna Capital (Medium)
  • Break a palindrome to smallest non-palindrome - Akuna Capital (Medium)
Akuna Capital logo
Akuna Capital
Aug 1, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
1
0
  1. 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.
  2. 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.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Akuna Capital•More Software Engineer•Akuna Capital Software Engineer•Akuna Capital Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.