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 2311–2340 of 3276 results

  • PinterestMediumData Scientist
    Find list pair with maximum overlap

    This question evaluates proficiency with set operations and similarity metrics (Jaccard), scalable algorithm design and complexity analysis for large datasets, and the ability to handle streaming updates and deterministic tie-breaking.

    Coding & AlgorithmsOnsite
  • PinterestMediumSoftware Engineer
    Find minimum shuttle transfers

    Find minimum shuttle transfers evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsOnline Assessment
  • PinterestMediumSoftware Engineer
    Find the Minimum Number of Coins for an Amount

    Tests dynamic programming and breadth-first search techniques to find the minimum number of coin denominations required to reach a target value, including edge cases like zero and unreachable sums.

    Coding & AlgorithmsOnsitedynamic-programmingbfsarrays
  • PinterestMediumMachine Learning Engineer
    First Word Matching Each Prefix Query

    This problem tests your ability to efficiently query a list of strings to find the first occurrence that matches a given prefix, focusing on optimal space-time tradeoffs using tree-based or map-based indexing.

    Coding & AlgorithmsOnsiteTrieHash MapString Processing
  • PinterestMediumMachine Learning Engineer
    Generate all hyperparameter combinations

    This problem tests your ability to generate the Cartesian product of multiple lists, a fundamental task in grid search for hyperparameter tuning.

    Coding & AlgorithmsTechnical ScreenCombinatoricsRecursionIteration
  • PinterestMediumMachine Learning Engineer
    Hierarchical Access Control for an Advertising Platform

    This problem tests graph traversal algorithms and efficient membership checking within a directed acyclic graph (DAG) representing hierarchical organizational permissions.

    Coding & AlgorithmsOnsiteGraphsDAGBFS/DFS
  • PinterestMediumData Scientist
    How to Design a Proportional Randomized Sampler?

    This question evaluates proficiency in randomized algorithms and probabilistic sampling, with emphasis on numerical precision, large-weight handling, and memory-versus-accuracy trade-offs. Commonly asked in Coding & Algorithms interviews for data-science roles, it assesses practical application ability grounded in conceptual understanding of numerical stability and relevant data-structure choices.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Implement Data Structure for Top-K Elements in Streams

    This question evaluates competency in streaming algorithms, dynamic data structures for maintaining top-K elements in real time, and scalability considerations for handling large or distributed input streams.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Implement Function to Return First n Prime Numbers

    This question evaluates algorithmic problem-solving and basic number-theory competency by requiring generation of prime numbers with attention to correctness and performance characteristics.

    Coding & AlgorithmsOnsite
  • PinterestMediumData Scientist
    Implement Jackknife and Random Choice

    Implement weighted random selection from scratch and compute delete-1 jackknife estimates of parameter bias and standard error for an arbitrary statistical estimator.

    Coding & AlgorithmsTechnical Screensamplingresamplingstatistics
  • PinterestMediumData Scientist
    Implement LRUCache with O(1) Operations and Thread Safety

    This question evaluates a candidate's ability to implement a constant-time LRU cache and reason about thread-safety and concurrent access, testing data structure design and concurrency competencies in the Coding & Algorithms domain.

    Coding & AlgorithmsOnsite
  • PinterestMediumMachine Learning Engineer
    Implement a Sparse Matrix Class

    Design and implement a memory-efficient sparse matrix class supporting entry retrieval, updates, addition, and matrix multiplication.

    Coding & AlgorithmsTechnical Screensparse-matrixhash-tablelinear-algebra
  • PinterestHardMachine Learning Engineer
    Implement a Stateful Search Autocomplete Session

    Design an interactive autocomplete system that tracks query frequencies, returns the top 3 ranking prefix matches per keystroke, and commits completed queries to dynamic history.

    Coding & AlgorithmsTechnical ScreenTrieHash TableDesign
  • PinterestMediumSoftware Engineer
    Implement a min-heap column allocator

    This question evaluates a candidate's competency in data structures (priority queues/min-heaps), online algorithm design for stream processing, and complexity and memory analysis.

    Coding & AlgorithmsTechnical Screen
  • PinterestMediumData Scientist
    Implement and extend My Calendar III

    This question evaluates competency in designing and implementing efficient dynamic interval data structures, handling correctness for duplicate and nested intervals, extending APIs with cancellation and point queries, and performing rigorous worst-case time/space analysis and resource-adaptation.

    Coding & AlgorithmsTechnical Screen
  • PinterestEasyData Scientist
    Implement np.random.choice

    This problem tests your ability to implement weighted random sampling from an array, focusing on probability distribution handling and efficient selection algorithms.

    Coding & AlgorithmsTechnical ScreenProbabilitySamplingAlgorithms
  • PinterestMediumSoftware Engineer
    Implement sparse matrix storage, addition, and multiplication

    This problem tests your ability to design a memory-efficient representation for sparse matrices and implement arithmetic operations while leveraging the sparsity of the data.

    Coding & AlgorithmsOnsiteArraysHash MapsLinear Algebra
  • PinterestMediumSoftware Engineer
    Implement stream line reader and settle balances

    This question evaluates streaming I/O and buffered string-processing competency for Part 1 and transaction netting with balance computation for Part 2, covering skills in memory-bounded parsing, data-structure bookkeeping, and algorithmic flow reasoning.

    Coding & AlgorithmsOnsite
  • PinterestMediumSoftware Engineer
    Implement string-based big integer multiplication

    Implement multiplyStrings(a, b) to multiply two non-negative integers given as decimal strings, returning the product as a string without any big-integer or arbitrary-precision library. The solution covers grade-school O(n*m) long multiplication with linear memory, the Karatsuba and FFT/NTT scaling alternatives, correct carry and leading/trailing-zero handling, and a full edge-case test plan.

    Coding & AlgorithmsOnsite
  • PinterestEasyMachine Learning Engineer
    Implement string-based rounding without floats

    This question evaluates proficiency in string-based numeric processing, arbitrary-precision arithmetic concepts, precise rounding rules including deterministic tie-breaking, and handling of sign and decimal edge cases, and falls under the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • PinterestHardMachine Learning Engineer
    Implement trie-based autocomplete

    This problem tests your ability to implement a space-efficient Trie data structure capable of storing strings along with associated weights to return top-k suggestions for a given prefix.

    Coding & AlgorithmsOnsiteTrieData StructuresStrings
  • PinterestMediumData Scientist
    Implement weighted random choice

    This problem tests your ability to implement efficient weighted random selection, specifically focusing on cumulative distribution functions and binary search to achieve optimal query performance.

    Coding & AlgorithmsTechnical ScreenAlgorithmsProbabilityBinary Search
  • PinterestMediumSoftware Engineer
    Insert Operators to Reach a Target

    Tests backtracking with operator precedence handling and operand formatting to construct all valid arithmetic expressions evaluating to a target value.

    Coding & AlgorithmsOnsitebacktrackingrecursionstring
  • PinterestHardSoftware Engineer
    List All Plus/Times Expressions Reaching a Target Under Operator Precedence

    Tests backtracking and state tracking with operator precedence to evaluate and enumerate arithmetic expressions using addition and multiplication.

    Coding & AlgorithmsOnsiteBacktrackingRecursionMath
  • PinterestMediumSoftware Engineer
    List Unallocated Experiment Buckets

    Determine all unassigned experiment bucket IDs in the range [0, total_buckets - 1] given lists of control and treatment bucket allocations.

    Coding & AlgorithmsTechnical Screenarrayhash-tablebit-manipulation
  • PinterestMediumSoftware Engineer
    Mark and Compact a Heap-Indexed Subtree

    This problem tests array manipulation, heap-based tree traversal, and stable partitioning techniques while requiring memory efficiency without modifying the original input.

    Coding & AlgorithmsOnline AssessmentArraysTreesHeap
  • PinterestMediumData Scientist
    Maximize Non-Overlapping Task Scheduling Efficiency

    This question evaluates understanding of interval scheduling and resource optimization, focusing on reasoning about time intervals and conflict-free selection of tasks.

    Coding & AlgorithmsOnsite
  • PinterestMediumSoftware Engineer
    Minimum Transfers Between Pin Boards

    Tests breadth-first search and graph modeling skills by finding the shortest path across overlapping collections without constructing a dense graph between every pair.

    Coding & AlgorithmsOnsiteBFSGraphHash Map
  • PinterestMediumSoftware Engineer
    Rebalance Experiment Buckets with Minimal Reassignment

    Implement a deterministic rebalancing algorithm that redistributes entities among experiment buckets to meet exact target counts while minimizing reassignments and applying canonical tie-breaking.

    Coding & AlgorithmsTechnical Screengreedysortinghash-map
  • PinterestMediumSoftware Engineer
    Reconstruct an Itinerary from Flight Tickets

    Tests graph modeling, depth-first search (DFS), and Hierholzer's algorithm to construct an Eulerian path with lexicographical tie-breaking.

    Coding & AlgorithmsOnsiteGraphDFSEulerian Path