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 1141–1170 of 1706 results
- PinduoduoMediumSoftware EngineerClockwise Spiral Matrix Traversal That Turns at Blocked Cells
Return the values of a matrix in clockwise spiral order starting from the top-left cell, then extend the walk so that blocked cells force clockwise turns and can end it early. Tests precise grid simulation, direction rotation, visited and boundary checks, and an unambiguous stopping rule.
Coding & AlgorithmsTechnical Screen - PinduoduoMediumSoftware EngineerCompute longest increasing subsequence length
This question tests the ability to solve the Longest Increasing Subsequence (LIS) problem, specifically targeting the transition from a standard dynamic programming approach to an optimized binary search solution.
Coding & AlgorithmsTechnical ScreenDynamic ProgrammingBinary SearchArrays - PinduoduoHardSoftware EngineerCount Longest Substrings After Character Replacements
This problem tests the sliding window technique with dynamic constraints, requiring an efficient way to track window state and calculate valid substring counts.
Coding & AlgorithmsTechnical ScreenSliding WindowTwo PointersStrings - PinduoduoMediumSoftware EngineerDesign a Recency-Eviction Cache
This problem tests your ability to implement a Least Recently Used (LRU) cache using a combination of a hash map and a doubly linked list to achieve constant time operations.
Coding & AlgorithmsTechnical ScreenHash MapLinked ListLRU Cache - PinduoduoHardSoftware EngineerFind Shortest Square-Sum Path
This problem tests your ability to model a shortest-path graph search problem where states are integers and transitions involve adding perfect squares.
Coding & AlgorithmsTechnical ScreenDynamic ProgrammingBFSNumber Theory - PinduoduoMediumSoftware EngineerGenerate a Matrix in Spiral Order
This problem tests your ability to simulate a specific traversal pattern in a 2D grid and maintain precise boundary pointers to fill the matrix correctly.
Coding & AlgorithmsTechnical ScreenArrayMatrixSimulation - PinduoduoEasySoftware EngineerGenerate a Spiral Matrix
This problem tests your ability to manage matrix traversal coordinates and maintain state (direction and boundaries) while iteratively filling a grid.
Coding & AlgorithmsTechnical ScreenArraysMatricesSimulation - PinduoduoMediumSoftware EngineerLongest Single-Letter Substring After at Most k Character Changes
Given a string of uppercase letters and a budget of at most k single-character changes, find the longest run of one repeated letter that can be produced. Tests reasoning about which substrings can be made uniform, efficient counting, and a near-linear solution for strings of up to 100,000 characters.
Coding & AlgorithmsTechnical Screen - PinduoduoMediumSoftware EngineerTraverse a Matrix in Spiral Order
Traverse a rectangular matrix in clockwise spiral order using shrinking boundaries. Handle empty, single-row, and single-column inputs without duplicates while achieving linear time and constant auxiliary space beyond the result.
Coding & AlgorithmsTechnical Screen - PinterestMediumSoftware EngineerAnswer Policy Violation Log Queries
Design an in-memory query engine over a timestamp-sorted policy violation log to support aggregate, point, and range queries efficiently using hash maps and binary search.
Coding & AlgorithmsTechnical Screenhash-tablebinary-searchdesign - PinterestMediumSoftware EngineerAssign Pins to Shortest Columns
This question evaluates understanding of greedy assignment strategies and data structures for maintaining and updating minimums in an online allocation problem, while also testing load-balancing reasoning and analysis of time and space complexity.
Coding & AlgorithmsTechnical Screen - PinterestEasyData ScientistCompute average unique pins per user
This question evaluates a candidate's ability to process collections and compute aggregated metrics, including per-user deduplication of items, handling of missing/null entries, numeric averaging and rounding.
Coding & AlgorithmsTechnical Screen - PinterestMediumSoftware EngineerDecide target via subsequence plus/multiply expression
A Pinterest software-engineer coding screen: given positive 32-bit integers and a target, decide whether some subsequence with '+'/'*' operators evaluated strictly left to right (equal precedence) hits the target, and return a valid expression. The answer spans forward backtracking, monotonicity-based pruning, a divisibility-guided reverse search from the target, complexity analysis, and 32-bit overflow handling.
Coding & AlgorithmsTechnical Screen - PinterestMediumSoftware EngineerDelete and Compact a Forest Stored by Parent Indices
Implement subtree deletion on a parent-pointer forest array, supporting tombstoning and index compaction with pointer remapping.
Coding & AlgorithmsTechnical Screentreegrapharray - PinterestMediumMachine Learning EngineerDesign Hierarchical Permission Checks
This question evaluates understanding of hierarchical access control, tree data structures, and permission inheritance, testing competencies in data modeling and algorithmic reasoning.
Coding & AlgorithmsTechnical Screen - PinterestMediumSoftware EngineerDesign a violation log analyzer
This question evaluates proficiency in data structures, in-memory indexing and query design, algorithmic time/space complexity analysis, and reasoning about state management for dynamic event streams.
Coding & AlgorithmsTechnical Screen - PinterestMediumSoftware EngineerDetermine equality of arbitrarily nested sets
This question evaluates understanding of nested data structures and set semantics, including canonicalization, hashing, recursion, handling of edge cases, unit-test design, and time/space complexity analysis.
Coding & AlgorithmsTechnical Screen - PinterestMediumSoftware EngineerFind First Prefix-Matching Word
This problem tests your ability to efficiently search through a collection of strings to find the first element that satisfies a specific prefix condition, emphasizing clean iteration and edge case management.
Coding & AlgorithmsTechnical ScreenStringsArraysIteration - PinterestMediumMachine Learning EngineerGenerate 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 - PinterestMediumData ScientistImplement 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 - PinterestMediumMachine Learning EngineerImplement 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 EngineerImplement 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 EngineerImplement 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 ScientistImplement 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 ScientistImplement 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 - PinterestEasyMachine Learning EngineerImplement 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 - PinterestMediumData ScientistImplement 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 EngineerList 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 EngineerRebalance 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 EngineerReconstruct itinerary with lexicographic ties
This question evaluates a candidate's ability to model and traverse directed graphs with repeated edges, enforce lexicographic ordering among possible paths, and analyze time and space complexity for an algorithmic solution.
Coding & AlgorithmsTechnical Screen