Snowflake SWE AI/ML Intern Online Assessment Problems
Question Details
I recently gave the Snowflake SWE AI/ML Intern OA, and these were the three problems asked. The languages allowed were Go, Java, and Python only. --- # Problem 1: Simple Array Rotation Game ## **Descr
Full Details
I recently gave the Snowflake SWE AI/ML Intern OA, and these were the three problems asked. The languages allowed were Go, Java, and Python only. --- # Problem 1: Simple Array Rotation Game ##
Description: You are given an array of distinct positive integers and another array that specifies the number of left circular rotations to be performed. ###
Rotation Rule A left circular rotation shifts all elements one position to the left: * The element at index 0 moves to the last position. * All other elements shift left by one index. ###
Task For each rotation value in the rotate array: * Perform the rotation on the original array (not cumulatively). * Determine the index of the maximum element after the rotation. --- ##
Function Description Complete the function getMaxElementIndexes. ###
Parameters: * int a[n]: Array of distinct integers. * int rotate[m]: Array representing the number of rotations. ###
Returns: * int[m]: Array where each element represents the index of the maximum element after corresponding rotations. --- ##
Constraints * 1 ≤ n, m ≤ 100000 * 1 ≤ a[i] ≤ 1000000000 * 0 ≤ rotate[i] ≤ 1000000000 --- ###
Example 1
Input:
a = [1, 2, 3] rotate = [1, 2, 3, 4]
Output:
[1, 0, 2, 1]
Explanation: * Rotation 1 → [2, 3, 1], max = 3 at index 1 * Rotation 2 → [3, 1, 2], max = 3 at index 0 * Rotation 3 → [1, 2, 3], max = 3 at index 2 * Rotation 4 → [2, 3, 1], max = 3 at index 1 --- # Problem 2: String Formation ##
Description: You are given an array of strings where each string has the same length, and a target string. ###
Rules for Formation * You can pick characters from any string. * The indices of chosen characters must be strictly increasing. * You can use multiple characters from the same string. * Different choices of indices or strings count as different ways. --- ##
Task Determine the total number of ways to form the target string.
Return the result modulo: [10^9 + 7] --- ##
Function Description Complete the function numWays. ###
Parameters: * string words[n]: Array of strings of equal length. * string target: Target string to form. ###
Returns: * int: Number of ways to form the target string modulo (10^9 + 7) --- ##
Constraints * 1 ≤ n ≤ 1000 * 1 ≤ length of words[i] ≤ 3000 *
Sum of length of all words ≤ 100000 * 1 ≤ length of target ≤ length of words[i] --- ##
Example ###
Example 1
Input:
words = ["adc", "aec", "efg"] target = "ac"
Output:
4
Explanation: The 4 valid ways: 1. Take 'a' from "adc" (index 1), 'c' from "adc" (index 3) 2. Take 'a' from "adc", 'c' from "aec" 3. Take 'a' from "aec", 'c' from "adc" 4. Take 'a' from "aec", 'c' from "aec" --- # Problem 3: Test the Hypothesis ##
Description: You are given two datasets and a confidence level. Your task is to determine whether their means are significantly different using a t-test. --- ##
Hypothesis Testing * Perform a two-tailed t-test. * Compare the computed t-statistic with the critical t-value at the given confidence level. --- ##
Output Requirements
Return: 1. "Yes" → if means are significantly different 2. "No" → otherwise Also return a magnitude value, defined as: magnitude = |t_computed - t_critical| * Rounded to 2 decimal places --- ##
Function Description Complete the function testHypothesis. ###
Parameters: * int n: Number of data points * float x[n]: First dataset * float y[n]: Second dataset * float confidence_level: Confidence level ###
Returns: * array[2]: * First element: "Yes" or "No" * Second element: magnitude (rounded to 2 decimals) --- ##
Example ###
Example 1
Input:
x = [4.461, 7.757, 17.317, 4.151] y = [8.911, 12.68, -10.593, 17.048] confidence_level = 0.95
Output:
["No", 2.47]
Explanation: * The t-test shows the means are not significantly different. * The margin by which the null hypothesis holds is 2.47.
About This Question
This is a reported interview question from a snowflake interview for a swe role (intern level) during the oa round reported in 2026.
It covers the following topics: Arrays, Ml, Strings .
Difficulty rating: Easy
More Snowflake Interview Questions
About Snowflake Interview Reports
This question was reported by a candidate who interviewed at Snowflake. LeakCode aggregates interview reports from 10+ sources, including 1Point3Acres, Glassdoor, LeetCode Discuss, Blind, Reddit, Indeed, and Nowcoder. Each report is translated where necessary, deduplicated against existing entries, and tagged by company, role, round type, and reporting date.
Use this question as one calibration data point, not a memorization target. Companies typically rotate their question pools every 2-4 months; the exact wording of a 2024 question may differ from what you encounter today. The underlying pattern, difficulty level, and follow-up depth at Snowflake are the higher-signal extractions to take from this report.
For broader preparation context, the Snowflake interview process typically includes a recruiter screen, one or two technical phone screens, and a 4-5 round on-site loop covering coding, system design (at L4+ levels), and behavioral. Reports tagged on LeakCode show the round-by-round distribution and typical difficulty calibration. To browse questions filtered by round type and seniority, use the company hub linked above.
How To Practice This Type of Question
Solve similar problems on LeetCode under timed conditions (25-35 minutes per medium difficulty). The goal is pattern recognition: recognize the underlying technique (sliding window, two-pointer, BFS, memoized recursion, etc.) within 60-90 seconds of reading. Strong candidates verbalize their hypothesis out loud before coding, then iterate based on feedback. Weak candidates dive into implementation immediately, lose time on the wrong approach, and run out of time for follow-ups.
Companies update their question pools every 2-4 months. The exact wording of any given question may have been retired by the time you interview. Focus your prep on the pattern, not the specific problem. The patterns that appear in Snowflake reports consistently are the ones worth investing in; one-off niche problems are not.
During Your Snowflake Round
Apply the standard interview round template: clarify requirements (2-3 minutes), state your approach out loud and confirm direction with the interviewer (3-5 minutes), code with narration (15-25 minutes), test with concrete examples including edge cases (5 minutes), discuss optimization or trade-offs if time permits (5 minutes). This template is universally accepted across FAANG and adjacent companies; deviating from it produces weaker interviewer feedback signal.
The single most predictive failure mode in Snowflake reports tagged "no hire": not asking clarifying questions. Interviewers are explicitly trained to weight this. Strong candidates ask 3-5 clarifying questions even on problems that look obvious; weak candidates dive into code immediately. The clarifying-question check is often the first signal recorded in the interviewer's written notes.