Snowflake OA 2026 Real Question Analysis|Full Disassembly of 3 Hard Coding Questions

50 Views
No Comment

This set Snowflake OA is a set that has just been tested recently. The overall difficulty can be said to be on the upper level among OA from major manufacturers. The format is 3 questions in 120 minutes, all of which are mid+ or above in intensity, and the questions are geared towards algorithm modeling capabilities rather than simple templates. Almost all three questions require complete thinking + boundary processing + performance optimization. If the pace is slow, it is easy to be pressed for time. Let’s break down the structure of this set of real questions completely.

1. String Patterns

Introduction to the topic

Given word length WordLen And the maximum number of consecutive vowels allowed MaxVowels, count the number of legal words composed of English letters (a-z). The vowels are {a,e,i,o,u} (5 in total) and the consonants are the remaining 21 letters. A legal word means any number of consecutive vowels not exceeding MaxVowels, the result needs to be taken modulo 10⁹+7.

String Patterns
String Patterns-2

Problem-solving ideas

Use dynamic programming: dp[i][j] represents the number of legal strings of length i and ending with j consecutive vowels.

  • Play consonants: dp[i][0] = (sum of all states of the previous length) × 21
  • Put vowels: dp[i][j] = dp[i-1][j-1] × 5 (j ≤ maxVowels) Recurse from dp[0][0]=1 to wordLen, and finally sum up all j modulo 10⁹+7.

2. Paint the ceiling

Introduction to the topic

The construction company will generate a set of side lengths s according to a recursive formula. We need to select two side lengths from this set (you can choose the same one, equivalent to a square) to be the length and width of the house respectively. It is required that the product of these two side lengths (that is, the ceiling area) cannot exceed the given a. Finally, figure out how many legal options there are.

Paint the ceiling
Paint the ceiling-2

Problem-solving ideas

First, according to the formula s[i]=((k∗s[i−1]+b)modm)+1+s[i−1], starting from s[0], a length set s is generated according to the formula provided in the question, and a total of n side lengths are obtained; then, To avoid repeated calculations, s can be deduplicated and sorted in ascending order. The problem is then transformed into counting the number of rectangular combinations in the set that satisfy x ≤ y and x × y ≤ a. You can enumerate each smaller side x, then find all y's on its right side that satisfy the area constraint, and count the qualifying combinations into the answer. You can also use the double pointer method. A pointer Left Starting from the minimum length, another pointer Right Start with maximum length. If S[left]×S[right]≤aS[left]×S[right]≤A , then for the current Left, all from Left Arrive Right The elements of all satisfy the conditions, then Left Move right. Otherwise Right Shift left.

3. Task Scheduling

Introduction to the topic

There are two servers: paid server (task time-consuming Time[i],cost Cost[i]) and free servers (tasks take 1 and cost 0, but are only available when paid servers are occupied). Find the minimum cost to complete all tasks.

Task Scheduling
Task Scheduling-2

Problem-solving ideas

The key to this question is to understand the usage rules of the free server: as long as the paid server is running, the free server can process tasks in parallel, and each free task only takes 1 unit of time. So, if we put a certain task on a paid server, it will not only complete its task, but also generate Time[i] A free task quota is equivalent to one "coverage" Time[i] + 1 Task. The problem is transformed into: select a number of tasks and place them on the paid server so that all tasks are covered (total number of coverage ≥ n), while the total cost is minimized. This is essentially a 0/1 knapsack problem. Just use DP to find the minimum cost.

Sprint into major manufacturers OA|Real exam resources + practical assistance one-stop support

We have long followed the actual rhythm of OA and VO from major North American companies, including Amazon, Google, Meta and other mainstream tech companies, and accumulated a lot of experience in dismantling real high-frequency question types and structures. If you want to get more of the latest real test questions from major manufacturers, familiarize yourself with the difficulty and question type distribution of real OA in advance, conduct high-intensity targeted simulations before the official exam, or get more stable practical auxiliary support during the critical OA stage, you can directly Contact us . Align your tempo ahead of time and AC won't just be a matter of luck.

author avatar
Jory Wang Amazon Senior Software Development Engineer
Amazon senior engineer, focusing on the research and development of infrastructure core systems, with rich practical experience in system scalability, reliability and cost optimization. Currently focusing on FAANG SDE interview coaching, helping 30+ candidates successfully obtain L5/L6 Offers within one year.
END
 1