Affirm interview questions

Tech / SWE · 11 questions
Report an interview →

Browse 11 Affirm interview questions for software engineering and software development interview preparation. Questions in this collection are tagged for full-time roles. Explore the topics and stages below and filter the collection to plan your practice.

Interview stages in this collection
Phone screen, Onsite, Online assessment (OA)
Practice topics
Array (6), Hash Table (6), String (6), Design (4), Data Stream (2), Math (2), Queue (2), Randomized (2)

Questions come from candidate contributions and online research. Reports reflect past experiences and do not guarantee what Affirm will ask. Locked question details require points. Public examples below are free to read.

Read 3 free Affirm interview question examples

Browse all Affirm questions

11 questions

Free Affirm interview question examples

Read the full problem statements and use the links to revisit or share a specific example.

RandomizedSet

Medium · Phone screen · Onsite · Full-time

Got a design question where I had to implement a RandomizedSet class supporting insert, remove, and getRandom, all in average O(1). The trick is pairing a hash map with an array so you can do constant-time lookups and still pick a random element by index. The swap-to-end trick for remove was the key insight they were looking for. The interviewer also asked what would break if I used a linked list instead of an array.

Uncommon Substring

Medium · Onsite · Phone screen · Full-time

This one was tricky. Given an array of strings, find the shortest substring of each string that doesn't appear in any of the others. If there are ties, return the lexicographically smallest. I considered a trie-based approach to index all substrings from every string and mark which string they belong to. The interviewer seemed less interested in an optimal solution and more in whether I could reason through the brute force and then identify what to optimize.

Group Anagrams

Medium · Phone screen · Online assessment (OA) · Onsite · Full-time

Group anagrams together from an array of strings. I sorted each string to use as a key in a hash map, then grouped everything with the same sorted key. The interviewer asked about alternatives to sorting for the key, so I mentioned using a character frequency tuple instead. They also asked about the time complexity difference between the two approaches.