suno logo
Suno· Software Engineer

Suno - Software Engineer Tech Screen

Posted
21 Jul 2025
359 reads

Summary

During my Software Engineer tech screen at Suno, I was given a coding problem involving calculating user credits based on a referral system with specific rules and credit limits.

How it went

You need to calculate the total credits for each user who has more than 0 credits. Each referral results in 100 credits for both the referrer and the referee if the referee generates a song at the first time. The maximum number of credits a user can get by referring other users is 300 additional credits.

Input: referrals = [[1,2], [1, 3], [2, 3], [2,5], [3, 9]] Users who created songs = [2, 2, 4, 2, 3, 5, 8]

Output: {userId: credits} {1: 200, 2: 200, 3: 100, 5: 100}

Questions asked (1)

  1. 01

    Calculate User Credits from Referrals

    Data Structures & Algorithms · Medium

    You need to calculate the total credits for each user who has more than 0 credits. Each referral results in 100 credits for both the referrer and the referee if the referee generates a song at the first time. The maximum number of credits a user can get by referring other users is 300 additional credits.

    Input: referrals = [[1,2], [1, 3], [2, 3], [2,5], [3, 9]] Users who created songs = [2, 2, 4, 2, 3, 5, 8]

    Output: {userId: credits} {1: 200, 2: 200, 3: 100, 5: 100}

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Suno recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!