HackTheRounds Interview Experiences
Canva Software Engineer OA Experience (2026) - Beach Cleanup, Friend Recommendation, Max Strength Swaps
Canva backend SWE Codility OA from Sydney: beach can cleanup greedy, friend recommendation, element swap DP, and code reading MCQs. Engineering style counts.
By Anonymous ยท 2026-04-17
Background
I applied to Canva for a backend SWE position in Sydney in late March 2026 through a university careers event. I'm finishing a CS masters in Melbourne and had one backend internship at a local SaaS company the summer before. Canva's recruiting is regional-first: the OA is identical across tracks from what I could tell, but the interviewers and onsite expectations vary by office. I got the OA invite about four days after applying.
Timeline
- Applied: late March
- OA invite: 4 days later
- OA completed: 2 days after invite
- Status: under review at time of writing
I have not yet heard back, so this post is OA-only.
OA Format
Canva runs the OA on Codility for engineering roles. My session was 75 minutes for the coding portion. Three algorithmic problems plus a handful of multiple-choice reasoning and code-reading questions. The platform supports Python, Java, C++, and JavaScript for most roles. I wrote everything in Python.
Canva's OA grades more on code quality than most big-company OAs I had seen. Clear variable names, no copy-pasted helper functions, consistent style. Several people I talked to who cleared the OA had not gotten a perfect score on the test cases; they had earned partial credit with clean code and had clearly-stated assumptions commented inline.
Problem 1: Women in STEM Charity (Beach Can Cleanup)
Problem: A beach has n cans in a line, each with a weight. On each step, find the lightest can remaining (break ties by smallest index), add its weight to a running total, and remove that can along with its immediate left and right neighbors (if they exist). Repeat until no cans remain. Return the running total of lightest-can weights.
Example: cans = [5, 4, 1, 3, 2] . The lightest is 1 at index 2, so we add 1 to the total and remove cans at indices 1, 2, and 3 (weights 4, 1, 3). The remaining array is [5, 2] . Now the lightest is 2 at index 1, add 2 to the total, and remove cans at indices 0 and 1. Array is empty. Total is 1 + 2 = 3.
The naive approach is O(n^2): scan the array each round, find the min, remove a window of up to three. For n <= 2000 in the constraints, that is fine and I did exactly that. The "proper" solution would use a doubly linked list with a min-heap indexed by weight, with stale-entry cleanup at pop time, giving O(n log n). I mentioned that in a comment but did not implement it because the brute force passed within the time limit.
The subtle trap: when the lightest can is at index 0 or index n-1 , only one neighbor exists. The problem statement phrases this as "fewer if at the edge." Easy to miss.
This question is coming soon to HackTheRounds.
Problem 2: Social Media Suggestions
Problem: Implement a friend recommendation system. You are given n users indexed 0 to n-1 and m friendships as a 2D array. For each user, recommend the non-friend user with the most common friends. Break ties by smallest index. If no valid recommendation exists, return -1 for that user.
Build the graph as an adjacency set per user. For each user u , iterate over all users v that are not u and not already a friend of u . Compute |friends(u) intersect friends(v)| as the number of common friends. Track the best count and tie-break on smallest index.
For small n this is a double loop with a set intersection inside, which is O(n^2 avg degree). If n were huge you would want a better approach: precompute a 2-hop graph, or use matrix multiplication on the adjacency bit matrix and read off A^2[u][v] as the common-friend count. I wrote the straightforward version and mentioned the matrix-multiplication variant in a comment.
The trap here is making sure "already friends" excludes them from being recommended. I had a bug on my first pass where I was recommending friends to themselves because I forgot the "not a friend" filter. Debugged it with a three-user toy example before submitting.
This question is coming soon to HackTheRounds.
Problem 3: Element Swapping for Max Weighted Sum
Problem: Given an integer array arr of length n , you may swap any adjacent pair (arr[i], arr[i+1]) zero or more times, but each element can be involved in at most one swap across the whole sequence. Define the strength of an index i as arr[i] (i + 1) (1-indexed for the multiplier). Maximize the sum of strengths across all indices.
Example: arr = [2, 1, 4, 3] . Swap index 0 with 1, and index 2 with 3. New array [1, 2, 3, 4] . Sum of strengths is 1 1 + 2 2 + 3 3 + 4 4 = 30 .
Because each element can only be in one swap, the swaps form a matching over adjacent positions. We have to decide, for each pair of adjacent positions, whether to swap them or not, such that the chosen swaps do not overlap. This is a classic 1D DP.
Define dp[i] = maximum sum of strengths over arr[0..i] with valid swap choices up through index i . The transition has two cases: don't swap position i with i-1 , contributing arr[i] (i + 1) , or swap them, contributing arr[i-1] (i + 1) + arr[i] i and requiring that i-1 and i-2 were not swapped (i.e., we transition from dp[i-2] ). The recurrence is dp[i] = max(dp[i-1] + arr[i] (i + 1), dp[i-2] + arr[i-1] (i + 1) + arr[i] i) .
Base cases: dp[0] = arr[0] 1 and dp[1] = max(arr[0] 1 + arr[1] 2, arr[1] 1 + arr[0] 2) .
O(n) time and O(1) space with a rolling pair of previous values. For n <= 10^5 , this is comfortably fast.
This question is coming soon to HackTheRounds.
Reasoning / Code-Reading Section
After the three coding problems, Codility served six multiple-choice questions: two logical-reasoning (flowchart tracing, rule elimination), two code-reading (Python snippets where you predict the output), and two about code smells (pick the cleanest of four equivalent implementations).
The code-reading questions were not easy. One involved a generator that was being consumed twice, and the trap answer was "it produces the same values both times." The correct answer is "the second consumption yields nothing because the generator is exhausted." This is the sort of detail Canva cares about for a senior-track SWE role.
This question is coming soon to HackTheRounds.
What I Learned
The time pressure is real but not crushing. I finished the three coding problems in about 50 minutes and used the remaining 25 minutes to review my solutions, add inline comments explaining assumptions, and attempt the reasoning questions. Having a buffer for the cleanup pass mattered more than speed.
The engineering-style grading is also real. One of my friends who cleared the same OA wrote his submission with clear helper function names, type hints, and brief docstrings, and told me he got passed through to the next round despite missing a test case on problem 3.
This question is coming soon to HackTheRounds.
Tips
- Write Problem 1 as a brute-force with a clear comment about the O(n log n) version. For `n <= 2000`, the O(n^2) passes. Do not burn time on the heap-plus-linked-list variant. Noting that you know the cleaner approach in a comment is enough.
- For Problem 2, exclude the user themselves AND their existing friends from the candidate pool. I missed the self-exclusion on my first pass. Write a three-user example on paper before coding to avoid this.
- For Problem 3, the "each element at most one swap" constraint is what makes it DP. Without that constraint the answer is trivially "sort descending." Make sure your recurrence enforces the non-overlap of swaps.
- Codility penalizes poor engineering style. Use meaningful names, break logic into helpers, add assumptions as comments. I passed with clean code and a comment flagging my O(n^2) choice; the recruiter said the reviewer specifically noted the style was on par with internal code.
- Do not skip the code-reading section to save time for coding. It is worth maybe 15 percent of the overall score and Canva's reviewer weights it heavily for backend roles. A five-minute pass over the six questions beats a ten-second guess.
- Canva OA is harder than the average Australian tech OA but easier than Stripe or Jane Street. The difficulty ceiling is LeetCode Medium plus style grading. If you are in that band, you are on track. Do not over-prep on hard graph theory.
Will update if and when I hear back about next steps.
This question is coming soon to HackTheRounds.