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 781–810 of 1080 results
- OtherMediumData ScientistWrite mini-batch gradient descent
This question evaluates understanding and implementation of optimization algorithms for machine learning, specifically mini-batch gradient descent, and measures competency in numerical optimization, algorithmic implementation, and training dynamics within the Coding & Algorithms domain for Data Scientist roles.
Coding & AlgorithmsOnsite - Otter.AiMediumSoftware EngineerFewest Adjacent-GCD Operations to Turn Every Array Element into 1
Given an array of positive integers, find the fewest operations that make every element 1, where each operation replaces one of two neighboring values with their greatest common divisor, or return -1 if it cannot be done. Tests GCD properties, lower-bound reasoning and careful case analysis on small arrays.
Coding & AlgorithmsOnsite - PalantirEasySoftware EngineerFind Shortest Paths in Road Network
This question evaluates understanding of graph data structures and shortest-path concepts, including correct modeling of undirected edges, unweighted versus weighted pathfinding, and algorithmic time and space complexity.
Coding & AlgorithmsOnsite - Palo Alto NetworksMediumSoftware EngineerFind Maximum Rectangle in Bar Chart
This question evaluates algorithmic problem-solving and data structure proficiency in computing the maximum rectangular area within a histogram-like array, focusing on contiguous segment analysis and range-based aggregation.
Coding & AlgorithmsOnsite - Palo Alto NetworksMediumSoftware EngineerFind normalized list difference efficiently
This question evaluates competency in computing normalized list differences, including string normalization, collection comparison, duplicate handling, and time and space complexity reasoning.
Coding & AlgorithmsOnsite - Palo Alto NetworksMediumSoftware EngineerMirror a binary tree and analyze complexity
This question evaluates understanding of binary tree manipulation and traversal methods, emphasizing recursion and iterative approaches as well as the ability to reason about time and space complexity.
Coding & AlgorithmsOnsite - PayPalMediumData ScientistCount Word Frequency and Print Top Three Words
This question evaluates proficiency in basic Python programming, string/text processing, frequency counting and sorting algorithms, reflecting core competencies for data manipulation tasks.
Coding & AlgorithmsOnsite - PayPalMediumMachine Learning EngineerMaximize ones with limited flips
This question evaluates proficiency with array algorithms, particularly sliding-window and two-pointer reasoning, complexity analysis, and the ability to adapt solutions for streaming data.
Coding & AlgorithmsOnsite - PayPalMediumSoftware EngineerMinimize a String Using Allowed Swaps
This question evaluates understanding of graph connectivity and constrained string reordering, along with proficiency in applying efficient data structures and algorithms for handling large inputs.
Coding & AlgorithmsOnsite - PayPalMediumMachine Learning EngineerSearch a word in a grid
This question evaluates proficiency in grid traversal and stateful search techniques such as depth-first search and backtracking, including visited-state management and pruning strategies within the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - PinterestMediumData ScientistCalculate 95% Bootstrap Confidence Interval for Order Values
This question evaluates a data scientist's competence in statistical inference using bootstrap resampling, proficiency with numerical computing for large sample operations, and attention to performance optimization.
Coding & AlgorithmsOnsite - PinterestMediumSoftware EngineerCompute reachable cells for a cleaning robot
This problem tests graph traversal techniques (BFS/DFS) on a 2D grid, focusing on efficient coordinate management and state representation when navigating obstacles.
Coding & AlgorithmsOnsiteBFSGraph Traversal2D Grid - PinterestHardSoftware EngineerCount Distinct Active Pins per Time Segment from Overlapping Interaction Logs
Process overlapping pin interaction logs to calculate the number of distinct active pins over continuous time segments. Tests interval merging, line sweep techniques, and boundary handling.
Coding & AlgorithmsOnsitesweep-lineintervalssorting - PinterestMediumSoftware EngineerCross-reference logs to flag spam numbers
This question evaluates proficiency with data structures (such as hash maps), parsing and deduplication, frequency counting, input validation, and analysis of time and space complexity.
Coding & AlgorithmsOnsite - PinterestMediumData ScientistDecode and Explain Ambiguity in Compression Strings
This question evaluates parsing of compact count-value encodings, reasoning about ambiguous encodings, and combinatorial enumeration of all valid decodings.
Coding & AlgorithmsOnsite - PinterestMediumData ScientistDesign Algorithm to Minimize Payments in Expense-Sharing App
This question evaluates algorithm design and optimization skills, focusing on modeling multi-party transactions and minimizing the number of settlement operations.
Coding & AlgorithmsOnsite - PinterestMediumData ScientistDesign Data Structure for Sparse Matrices Operations
This question evaluates a candidate's ability to design efficient data structures and implement algorithms for sparse matrix storage and operations, emphasizing space-efficient representations, matrix arithmetic, and computational complexity reasoning.
Coding & AlgorithmsOnsite - PinterestMediumSoftware EngineerDesign adjustable ID allocator
A Pinterest software-engineer onsite coding problem: design an adjustable ID allocator over a fixed [0, 999] ID space with named, contiguous, non-overlapping bucket ranges. It covers initial allocation (packing from desired sizes and validating/normalizing proposed ranges), a resize operation that grows or shrinks a bucket by consuming adjacent free space and then minimally shifting or borrowing from neighbors under a deterministic policy, plus complexity analysis, boundary-case testing, and concurrency handling.
Coding & AlgorithmsOnsite - PinterestMediumData ScientistDetermine Pin Connections Through Common Boards
This question evaluates graph modeling and connectivity concepts, including representing boards and pins as relationships and reasoning about reachability and minimal connection paths.
Coding & AlgorithmsOnsite - PinterestMediumSoftware EngineerFewest Buses to Ride Between Two Stops on Looping Bus Lines
A coding problem about bus lines that loop through fixed lists of stops: find the fewest buses a rider must board to travel from a source stop to a target stop, or report that the target cannot be reached. It tests modeling transfers between lines as a graph and keeping the search efficient when many lines share stops.
Coding & AlgorithmsOnsite - PinterestMediumData ScientistFind available reservation time slots
This question evaluates a candidate's ability to reason about time-interval data and temporal normalization, testing competencies in interval manipulation, conflict detection, and algorithmic problem-solving for scheduling contexts.
Coding & AlgorithmsOnsite - PinterestMediumData ScientistFind 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 EngineerFind 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 EngineerFirst 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 EngineerHierarchical 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 ScientistHow 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 ScientistImplement 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 ScientistImplement 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 ScientistImplement 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 - PinterestMediumSoftware EngineerImplement 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