Katkat

practice a little every day, paws crossed ♡

Coding & Algorithms Interview Questions

Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.

9403
Questions
546
Companies
11
Topics
8
Languages

Showing 2641–2670 of 3276 results

  • SnowflakeMediumSoftware Engineer
    Check Whether a Proposed Course Order Respects Every Prerequisite

    Given courses, prerequisite pairs and a proposed order, decide whether the order lists every course exactly once and places each course after all of its prerequisites. It tests position indexing, permutation checks and careful handling of missing or repeated courses.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeHardSoftware Engineer
    Check if each recipe is a contiguous subsequence

    This problem tests your ability to efficiently determine if one sequence exists as a contiguous segment within another using pattern matching techniques.

    Coding & AlgorithmsTechnical ScreenArraysKMP AlgorithmPattern Matching
  • SnowflakeMediumSoftware Engineer
    Collect a Binary Tree's Outer Boundary Values Anticlockwise

    Given a binary tree stored as child-index arrays, return its boundary values anticlockwise: the root, the left boundary, the leaves from left to right and the right boundary from bottom to top, whose total is the boundary sum. It tests precise traversal rules and edge cases.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Compute Effective Letter Permissions in a DAG

    Compute the effective lowercase letter permissions for every node in a directed acyclic graph (DAG), where granted permissions propagate transitively to all descendants while explicit denials apply only locally.

    Coding & AlgorithmsTechnical ScreenDAGtopological-sortbit-manipulation
  • SnowflakeMediumSoftware Engineer
    Compute Progressive Income Tax in Cents from Bracket Limits

    Given progressive tax brackets as upper limits with percentage rates and an income in whole dollars, return the total tax owed in cents. It tests careful handling of bracket boundaries, partly filled brackets and exact integer arithmetic instead of floating point.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Compute height after deletions; enumerate valid delete sets

    This question evaluates competence in binary tree manipulation and combinatorial search, covering promotion-based node deletion, height computation across forest components after root deletion, enumeration of deletion sets with deduplication, pruning strategies, and time/space complexity analysis.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeHardSoftware Engineer
    Compute height of tree with deleted nodes; minimize deletions

    This question evaluates understanding of tree data structures, connectivity after node deletions, and optimization for minimizing additional removals, and is categorized under Coding & Algorithms. It is commonly asked to assess reasoning about tree pruning and height computation under constraints, testing both conceptual understanding of tree properties and practical algorithmic implementation.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Compute shortest path between tree nodes

    Given a binary tree and two node values u and v, return the shortest path between them as an ordered list of node values. This Snowflake onsite question tests lowest-common-ancestor logic, path reconstruction, iterative vs. recursive implementation, complexity analysis, and preprocessing strategies (parent pointers, binary lifting, Euler tour + RMQ) for answering many queries efficiently.

    Coding & AlgorithmsOnsite
  • SnowflakeMediumSoftware Engineer
    Compute task order and layered execution

    This question evaluates a candidate's understanding of graph algorithms and dependency resolution, covering concepts such as topological ordering and cycle detection.

    Coding & AlgorithmsOnsite
  • SnowflakeMediumSoftware Engineer
    Compute task order with prerequisites

    This question evaluates proficiency in graph algorithms—particularly topological ordering and cycle detection—along with the use of efficient data structures for representing dependencies and analyzing time and space complexity.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Compute total time to finish all courses

    This problem tests your ability to model task dependencies using a directed graph and calculate the earliest completion time for all tasks, effectively identifying the critical path in a project schedule.

    Coding & AlgorithmsTechnical ScreenGraphTopological SortDynamic Programming
  • SnowflakeMediumSoftware Engineer
    Decide Whether Repeatedly Summing Squared Digits Reaches 1

    Starting from a positive integer, repeatedly replace it by the sum of the squares of its digits and decide whether the sequence reaches 1 or falls into a cycle. It tests cycle detection on an implicit sequence and reasoning about why the values stay bounded.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Decide Whether an Undirected Graph Can Be Colored with Three Colors

    Given an undirected graph with up to fifteen nodes, decide whether every node can receive one of three colors so that no edge joins two nodes of the same color. It tests backtracking search with pruning and reasoning about odd cycles and cliques.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Deep-Copy a Linked List with Random Pointers

    Implement a deep copy of a linked list where each node has both a next pointer and an arbitrary random pointer, ensuring all reachable nodes and relationships are replicated without modifying the original list.

    Coding & AlgorithmsTechnical ScreenLinked ListHash TableGraph
  • SnowflakeMediumSoftware Engineer
    Delete the Fewest Tree Nodes to Meet a Height Limit

    Find a minimum-cardinality set of tree-node deletions under child-promotion semantics using height-budget dynamic programming and explicit solution reconstruction.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Design an in-memory filesystem and circular queue

    This question evaluates a candidate's skills in data-structure and algorithm design, API specification, correctness reasoning, and time/space complexity analysis within the Coding & Algorithms domain by combining an in-memory hierarchical filesystem design with a fixed-size circular queue implementation.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Design error detection and propagation algorithms

    This question evaluates algorithm design and complexity-analysis skills across search and graph problems, specifically log search for first-error detection, reachability and failure propagation in directed service dependency graphs, and longest-path reasoning under cycle or DAG assumptions.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeHardSoftware Engineer
    Design transactional in-memory key-value store

    This question evaluates understanding of in-memory key–value store semantics, transactional and nested transaction behavior, and practical competencies in hash-based data structures and thread-safety for concurrent access.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Determine Whether an Undirected Graph Is 3-Colorable

    This problem tests knowledge of graph theory, specifically constraint satisfaction, and the ability to implement a backtracking algorithm to solve NP-complete problems on small constraints.

    Coding & AlgorithmsTechnical ScreenGraphBacktrackingRecursion
  • SnowflakeMediumSoftware Engineer
    Evaluate an Arithmetic Expression with Parentheses, Unary Minus and Four Operators

    Evaluate an arithmetic expression string with non-negative integers, addition, subtraction, multiplication, division truncating toward zero, parentheses and a unary minus. It tests tokenizing, operator precedence, left-to-right evaluation and deeply nested parentheses without eval.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Evaluate arithmetic expression with variables

    This question evaluates implementation skills for a linear-time expression parser and evaluator, covering tokenization, variable substitution, operator precedence and associativity (including unary +/−), parentheses handling, integer arithmetic semantics (division truncation), error detection, and adherence to O(L) time and space constraints.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Fewest Buses Needed to Cover Every Scheduled Trip

    Given scheduled trips with start and end times, return the fewest buses needed so that no bus runs two trips at once, where a bus may start a trip the moment its previous one ends. It tests reasoning about maximum interval overlap and boundary handling.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Fewest Node Additions and Removals to Make a Binary Tree Perfect

    Given a binary tree described by left and right child arrays, return the fewest single-node additions and leaf removals that turn it into a perfect binary tree, which is 0 exactly when it is already perfect. Tests tree traversal and reasoning about tree shape, including very deep, skewed trees.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Fewest Semesters to Finish All Courses Taking At Most k per Semester

    Given up to fifteen courses with prerequisites and a cap of k courses per semester, return the fewest semesters needed to take every course. It tests why simple greedy choices fail and how to search the space of partial plans efficiently.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Filter hierarchical paths after deletions

    This question evaluates proficiency in hierarchical string processing, prefix-based filtering, edge-case handling (duplicates, trailing slashes, empty inputs), data-structure selection, and algorithmic time/space complexity analysis within the Coding & Algorithms domain, emphasizing practical implementation over purely conceptual reasoning.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeHardSoftware Engineer
    Find Every Three-Card Set Among Cards With Four Attributes

    A coding problem based on a card game in which each card has four attributes with three values each, and three cards form a set when every attribute is all the same or all different. It asks for every set among a group of distinct cards, testing the validity rule, canonical output ordering and improving on a cubic brute force.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Find Shortest Grid Path

    This question evaluates a candidate's ability to implement and reason about grid-based shortest-path algorithms, covering graph traversal, state representation, and obstacle handling.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Find Shortest Wiki Click Path

    This question evaluates understanding of graph traversal and shortest-path concepts, testing competencies in algorithm design, handling cycles, complexity analysis, and integration with external link-retrieval APIs.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Find Tree Height After Deleting Nodes and Promoting Children

    Compute tree height after deleting nodes while promoting their children, preserving descendants and counting retained nodes without rebuilding the tree.

    Coding & AlgorithmsTechnical Screen
  • SnowflakeMediumSoftware Engineer
    Find longest substring with at most k distinct

    This question evaluates a candidate's ability to design efficient string-processing algorithms using sliding-window techniques, reason about time and space complexity, and correctly handle Unicode grapheme clusters when returning substrings.

    Coding & AlgorithmsOnsite