Ramp

Ramp Software Engineer Onsite Coding Questions

3+ questions from real Ramp Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.

3
Questions
3
Topic Areas
10+
Sources

What does the Ramp Onsite Coding round test?

The Ramp onsite coding round is the core technical evaluation. Software Engineer candidates typically see 2-3 algorithm and data structure problems. Problems range from medium to hard difficulty, and interviewers evaluate both correctness and code quality.

Top Topics in This Round

Ramp Software Engineer Onsite Coding Questions

Has anyone done Ramp’s **AI live coding interview** recently? Curious what the format/tasks look like. Would really appreciate any insight β€” feel free to **DM me** if you prefer. πŸ™

## Round 1 - Coding ## Problem Implement a Rock Paper Scissors game engine. Support two players (human or bot), track wins/losses/draws per player, and return a match summary after `N` rounds. ```python class RPSGame: MOVES = {"rock", "paper", "scissors"} def __init__(self, rounds: int): ... def play_round(self, move1: str, move2: str) -> str: # returns "player1", "player2", or "draw" ... def get_stats(self) -> dict: # {"player1": {"wins":int,"losses":int,"draws":int}, # "player2": {...}, "rounds_played": int} ... def winner(self) -> str: # "player1", "player2", or "tie" after all rounds ... ``` ## Example ``` game = RPSGame(rounds=3) game.play_round("rock", "scissors") -> "player1" game.play_round("paper", "paper") -> "draw" game.play_round("scissors", "rock") -> "player2" game.get_stats() # -> {"player1":{"wins":1,"losses":1,"draws":1}, # "player2":{"wins":1,"losses":1,"draws":1}, "rounds_played":3} game.winner() -> "tie" ``` ## Follow-ups 1. How would you add Rock Paper Scissors Lizard Spock? What data structure best represents the win/loss matrix? 2. Implement a simple bot strategy: always play the move that beat the opponent's last move. 3. How do you validate that moves are legal and handle invalid input gracefully? 4. How would you serialize and restore game state mid-match?

## Round 1 - Coding ## Problem Given a block of text, compute the frequency distribution of word lengths. Return a sorted list of `(length, count)` pairs and render a simple ASCII histogram. ```python def word_length_distribution(text: str) -> list[tuple[int, int]]: # returns [(length, count), ...] sorted by length ascending ... def render_histogram(distribution: list[tuple[int, int]]) -> str: # each row: "length | ##### count" ... ``` ## Example ``` text = "the quick brown fox jumps over the lazy dog" word_length_distribution(text) # -> [(3,4),(4,2),(5,2),(6,1)] # "the"x2, "fox", "the" -> len 3 appears 4 times # "over","lazy" -> len 4 appears 2 times, etc. render_histogram([(3,4),(4,2),(5,2)]) # 3 | #### 4 # 4 | ## 2 # 5 | ## 2 ``` ## Follow-ups 1. What counts as a "word"? How do you handle punctuation attached to words like `"fox,"` or `"dog."`? 2. How would you normalize the histogram so bars represent percentages instead of raw counts? 3. How does the output change for very long words (length 20+) β€” does your histogram stay readable? 4. Extend this to also output the mean, median, and mode word length.

See All 3 Questions from This Round

Full question text, answer context, and frequency data for subscribers.

Get Access