
I recently completed Canva’s SDE interview. It gave me 90 minutes to solve three problems, and the overall difficulty was fairly moderate. The assessment covered three areas: counting redundant directional commands, matching positions after sorting an array, and counting substrings formed by consecutive segments in a binary string.
I am really grateful for the tool Linkjob.ai, and that's also why I'm sharing my entire OA interview experience here. Having an undetectable AI assistant during the interview is indeed very convenient.



My approach was based on identifying what actually determines the final destination. U and D control vertical movement, while L and R control horizontal movement, and the two dimensions are independent. I first counted the occurrences of all four directions. Vertically, the absolute difference between the counts of U and D gives the effective movement; horizontally, the difference between R and L gives the effective movement.
The total number of effective commands is the sum of the effective vertical and horizontal movements. The maximum number of deletable commands is simply the total number of commands minus the number of effective commands.
For example, in the sample input, U and D each appear once, giving an effective vertical movement of 0. R appears twice and L appears 0 times, giving an effective horizontal movement of 2. With a total length of 4, subtracting the 2 effective commands gives 2, which matches the example output.
This problem is straightforward: one pass through the string to count each direction is enough. Even for inputs up to 1e5, a simple frequency count handles it easily.



My first thought was that the correct order should simply be the heights sorted in ascending order. So I copied the original array, sorted the copy, and treated the sorted version as the correct lineup.
Then I compared the original array with the sorted array index by index. Whenever the values differed at the same position, it meant that the student at that position was standing incorrectly. In the sample case, three positions differ between the original and sorted arrays, so the answer is 3.
A key detail is not to sort the original array directly: always work on a copy. With n up to 1e5, using the language’s built-in sort is efficient enough and doesn’t require further optimization.

I have to say, Linkjob AI is really easy to use. I used it during the interview after testing its undetectable feature with a friend beforehand. With just a click of the screenshot button, the AI provided detailed solution frameworks and complete code answers for the coding problems on my screen. I’ve successfully passed the test, with the HackerRank platform not detecting me at all.


Since the string length can reach 5e5, a brute-force solution would definitely hit a timeout, so a more efficient strategy is required. I noticed that every valid substring must consist of one contiguous block of 0s followed by a contiguous block of 1s (or vice versa), with both blocks of equal length. This led me to preprocess the string into an array of group lengths, where each element is the length of one run of identical characters.
For the sample input, the string splits into lengths corresponding to runs of 0s, 1s, and 0s.
Next, the number of valid substrings formed by any two adjacent groups is simply the minimum of their lengths. For example, if the two groups have lengths 2 and 2, they contribute 2 substrings; if 2 and 1, they contribute 1. Summing these minimum values across all adjacent pairs yields the total number of valid substrings.
In the sample, summing these values gives 3, matching the expected output. This approach runs in O(n) time and handles large inputs easily. When I implemented it, it passed all tests on the first attempt.
My OA has 3 coding questions, all centered on practical algorithm fundamentals that fit entry-level engineering problem-solving needs. Iit mainly covers three core areas.
First is string processing including traversal, pattern extraction and logic simplification for character-related tasks. These are straightforward but require careful handling of each character to avoid miscalculations.
Second is array operations like sorting, element comparison and efficient traversal to validate or match target states.
Third is count-based and greedy logic, which means translating problem constraints into numerical calculations such as summing valid segment values or reducing redundant data.
These topics well-aligned with what Canva cares about for basic coding proficiency, as they directly reflect how I handle daily code-related tasks.
Difficulty: Overall it’s rated easy-to-medium. I felt the OA was designed to test clarity of problem understanding rather than complex algorithm design. Most questions could be solved with straightforward, efficient approaches with time complexity of O(n) or O(n log n). There were minimal tricky edge cases, so the focus was really on code accuracy and basic optimization. Nothing that required advanced data structures or fancy tricks.
Time Management: I set aside 40-45 mins total including checks and allocated time evenly. Initially, I spent 10-12 mins per question. String and array-based questions had clear logic, so I put most of that time into coding and basic test case verification, making sure each step matched the problem requirements.
Then I reserved 5-8 mins for final reviews. I prioritized checking counting logic to avoid off-by-one errors and array or string traversal efficiency to ensure no redundant loops that would cause timeouts. For slightly more involved topics like segment-based string tasks, I avoided overcomplicating things back then. Sticking to intuitive, step-by-step solutions helped me save a lot of time during the OA, and I finished all questions with a few mins left for last-minute checks.
These are easy-to-miss issues that often lead to timeouts or wrong answers, and I made sure to avoid them during my assessment:
First, don’t slack on input handling efficiency. Canva’s OA frequently uses large input sizes like 1e5+ elements. Using slow input tools instead of buffered readers will drag down speed and risk timeouts, even if core logic is correct. Prioritize fast input methods to keep code running within time limits.
Second, don’t skip testing edge cases. Empty strings, arrays with all duplicates, or single-element inputs are regular in their questions. Ignoring these scenarios means missing hidden errors that only show up in non-mainstream test cases. Always add quick checks for edge conditions before finalizing code.
Third, don’t overcomplicate simple logic. Their questions are built for straightforward solutions like using a single loop for counting instead of nested loops, or basic variables instead of complex data structures. Overengineering adds unnecessary code, increases the chance of bugs, and wastes time that could go to other questions. Stick to the most intuitive approach for each problem.
These strategies helped me work faster and avoid language-specific issues.
First, use efficient input/output classes. For large inputs, replace Scanner with BufferedReader and StringTokenizer. Scanner is too slow for 1e5+ lines, and it’s easy to hit timeouts even with correct logic. For output, use PrintWriter instead of System.out.println, as it buffers output and speeds things up.
Second, predefine common data structures. For string problems, keep a char array ready instead of using String methods repeatedly like charAt() in a loop. It’s a small tweak, but it adds up for long strings. For array sorting, use Arrays.sort() directly, but remember it’s in-place make a copy if the original array is needed later to avoid messing up data.
Third, handle integer overflow proactively. Some count-based problems involve summing large numbers like 1e5 elements each up to 1e9. Use long instead of int for sum variables, because Java doesn’t throw an error for overflow it just returns a wrong value. This prevents unexpected mistakes in large-value calculations.
Fourth, keep code concise. Java can be verbose, so avoid writing unnecessary classes or methods. If a problem only needs a single calculation loop, write it directly in the main method instead of creating a separate function. This saves time and makes debugging easier, since there’s no need to trace through multiple methods.
Focus on 15-20 easy-to-medium string and array problems on HackerRank, selected from tags like "String Manipulation" and "Array Sorting" to align with Canva’s OA focus. Skip hard problems; master these basic-to-moderate ones to build familiarity with the straightforward logic Canva prioritizes.
Create a concise Java cheat sheet with syntax prone to confusion, such as BufferedReader, PrintWriter, and Arrays.sort() usage. Review it for five minutes daily a week before the test to lock in these details.
Skim Canva’s engineering blog to grasp their emphasis on simple, readable code. Shift practice focus to clarity over complex tricks to align with their expectations.
Cease new problem practice 24 hours before the OA. Review notes on input methods and missed edge cases instead of cramming. Unwind the night before to avoid burnout.
Set up the test environment 10 minutes early: quiet space, charged device, HackerRank editor tested, and pen/paper ready for sketching logic to prevent mid-code blocks.
Adopt a "skip and return" strategy during the test. Move past questions taking over 3 minutes to outline, resolve other questions first, then revisit to clear mental blocks.
Spend 60 seconds scanning each solution before submission. Check for integer overflow (int vs. long) and array copy oversights even if sample tests pass, to avoid silly errors.
No, Canva required me to use Java. If the interview is for a front-end role, then JavaScript is required instead.
A: From my experience, it’s usually edge cases or small oversights. Other common issues: using int instead of long for large sums, or forgetting to copy arrays before sorting.
I got the result in 3 business days. It was a short email confirming pass/fail, no detailed feedback on individual questions.
The Winning Strategy I Employed for Next.js Interviews 2025
My 2025 ES6 Interview Questions and Winning Responses
My Journey to Success in Palantir New Grad SWE Interview 2025