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 871–900 of 1080 results
- SalesforceMediumSoftware EngineerFind a Celebrity from a Knows Matrix
Find a celebrity in a knows matrix with linear candidate elimination followed by complete verification that the candidate knows nobody and is known by everyone else.
Coding & AlgorithmsOnsite - SalesforceMediumSoftware EngineerFind a Valid Task Execution Order with Dependencies
Tests the ability to model workflow dependencies as a directed graph, perform topological sorting, and detect cycles.
Coding & AlgorithmsOnsitegraphtopological-sortbfs - SalesforceMediumSoftware EngineerFind the Kth Smallest Value in a Binary Search Tree
Return the one-based kth smallest value from a potentially deep binary search tree represented by parallel value and child-index arrays. Handle empty trees and out-of-range values of k using the specified sentinel.
Coding & AlgorithmsOnsite - SalesforceMediumSoftware EngineerFind the Lowest Common Ancestor Using Parent Pointers
Find the lowest common ancestor of two nodes in an acyclic forest represented only by parent pointers. Return the node itself for equal inputs and minus one when the nodes belong to different trees.
Coding & AlgorithmsOnsite - SalesforceMediumSoftware EngineerFlatten Nested Objects and Lists into Full Leaf Paths
Implement an iterative traversal to flatten nested dictionaries and lists into fully-qualified paths leading only to string leaf values, returned in deterministic sorted order.
Coding & AlgorithmsOnsiteDepth-First SearchStackRecursion - SalesforceMediumSoftware EngineerGenerate Every Generalized Abbreviation of a Word
Generate every generalized abbreviation of a lowercase word by replacing selected character runs with positive counts. Merge consecutive skipped characters correctly and return the complete result in lexicographic order.
Coding & AlgorithmsOnsite - SalesforceMediumMember of Technical StaffImplement Merge Sort and Return a Sorted Array
Tests your ability to implement a classic divide-and-conquer merge sort algorithm from scratch, maintaining stability and achieving O(n log n) time complexity without relying on built-in sorting utilities.
Coding & AlgorithmsOnsitesortingdivide-and-conquerrecursion - SalesforceHardSoftware EngineerImplement an LFU cache
This question evaluates understanding of data structures and cache eviction policies, specifically frequency tracking for LFU caches and LRU tie-breaking among equal-frequency items.
Coding & AlgorithmsOnsite - SalesforceMediumSoftware EngineerImplement an LFU cache with O(1) operations
This problem tests your ability to maintain multiple layers of linked data structures to achieve O(1) time complexity for both access and eviction in an LFU (Least Frequently Used) cache.
Coding & AlgorithmsOnsiteData StructuresHash MapDoubly Linked List - SalesforceMediumSoftware EngineerImplement common data-structure and JS tasks
This problem tests your ability to design a time-aware data structure, manipulate linked structures, and demonstrate mastery over JavaScript's asynchronous execution model and functional programming patterns.
Coding & AlgorithmsOnsiteData StructuresLinked ListsJavaScript - SalesforceMediumSoftware EngineerMinimize operations to reduce integer to zero
This problem tests your ability to optimize mathematical transformations on an integer using greedy strategies or dynamic programming by analyzing the parity and binary representation of the input.
Coding & AlgorithmsOnsiteGreedyBit ManipulationRecursion - SalesforceMediumSoftware EngineerMinimum Sum of Weekly Maximum Costs
Partition an array of daily costs into k contiguous weeks to minimize the sum of each week's maximum cost using dynamic programming.
Coding & AlgorithmsOnsiteDynamic ProgrammingArrayMonotonic Stack - SalesforceMediumSoftware EngineerValidate a Generalized Word Abbreviation
Validate whether a lowercase word matches a generalized abbreviation whose positive numbers skip characters. Enforce exact letter matching, full consumption, multi-digit counts, and the prohibition on leading zeroes.
Coding & AlgorithmsOnsite - SamsungMediumMachine Learning EngineerMaximize sum of non-adjacent values
This question evaluates algorithmic problem-solving skills, specifically understanding of dynamic programming and optimization when selecting non-adjacent elements, within the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - Scale AIMediumSoftware EngineerCompute party time blocks per neighborhood
This question evaluates a candidate's ability to perform interval merging and temporal aggregation across joined datasets, testing algorithmic efficiency, data-processing skills, and handling of sorting and grouping in the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - Scale AIEasyMachine Learning EngineerImplement multi-head attention and LLM sampling
This problem tests your ability to implement the core mechanics of a Transformer's attention mechanism and the logic required to sample the next token from a model's output logits.
Coding & AlgorithmsOnsiteTransformersDeep LearningNumPy - SealthEasyMachine Learning EngineerImplement one-cluster k-means
This question tests the ability to implement a one-cluster k-means algorithm (finding the geometric centroid) and understanding of the mathematical property that minimizes sum of squared errors.
Coding & AlgorithmsOnsiteK-MeansClusteringStatistics - SheinMediumSoftware EngineerSolve array modulo and parentheses tasks
This question evaluates proficiency in modular arithmetic and subarray-sum reasoning for remainder counting, together with string manipulation and parentheses-balancing competencies, testing algorithmic problem-solving, correctness justification, and implementation skills in the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - ShopifyMediumData ScientistCalculate Jaccard Similarity Score for Two String Lists
This question evaluates understanding of similarity metrics and competency in comparing string collections, reflecting knowledge of set-theoretic concepts and manipulation of collection data structures used in data processing.
Coding & AlgorithmsOnsite - ShopifyMediumMachine Learning EngineerImplement URL Shortening Codec
This question evaluates understanding of hashing, encoding, state management, and collision-handling strategies for creating a consistent mapping between long and short URLs, testing competencies in data structures, algorithms, and simple system design within the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - ShopifyMediumSoftware EngineerImplement an In-Memory File System
Implement an in-memory file system with absolute and relative path resolution, sorted listing, directory changes, creation, and removal. Enforce deterministic error codes, atomic validation, recursive deletion rules, and protection for the current directory and its ancestors.
Coding & AlgorithmsOnsite - ShopifyMediumMachine Learning EngineerImplement an interactive CLI class with tests
This question evaluates object-oriented design, command-line interface implementation, persistent state management, input validation and error logging, extensibility for new commands, comprehensive unit testing, and continuous integration configuration.
Coding & AlgorithmsOnsite - SigmacomputingMediumSoftware EngineerEvaluate a Formula AST with Variables
This problem tests tree traversal techniques, recursive evaluation, and the implementation of short-circuit logic in expression trees containing variables.
Coding & AlgorithmsOnsiteTreesRecursionAST - SnapchatMediumSoftware EngineerCompute islands in a binary grid
This question evaluates a candidate's competency in modeling grids as graphs, detecting connected components, applying graph traversal algorithms (DFS/BFS) and disjoint-set (Union-Find) data structures, and analyzing algorithmic time and space complexity.
Coding & AlgorithmsOnsite - SnapchatHardSoftware EngineerCompute longest increasing path in matrix
This question evaluates algorithmic problem-solving skills in graph traversal and dynamic programming on matrices, measuring understanding of state representation and performance trade-offs in grid-based searches within the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - SnapchatHardSoftware EngineerCompute shortest path in a 2D grid
This question evaluates understanding of graph traversal and pathfinding concepts, including modeling a 2D grid as a graph and reasoning about shortest-path computations and obstacle handling.
Coding & AlgorithmsOnsite - SnapchatMediumSoftware EngineerCount Grid Islands That Never Touch the Border
Coding problem on a binary grid where 0 marks land and 1 marks water: count the islands, connected horizontally or vertically, that have no cell on the grid's border. It tests grid traversal, connected components and careful handling of islands that reach the edge through a single cell.
Coding & AlgorithmsOnsite - SnapchatHardSoftware EngineerCount ways to decode digit string
This question evaluates a candidate's skill in dynamic programming and combinatorial reasoning about string partitioning, testing competency in counting valid decodings under constraint handling and edge-case analysis.
Coding & AlgorithmsOnsite - SnapchatMediumMachine Learning EngineerDetermine and print expression to reach target
This question evaluates skill in constructing and evaluating arithmetic expressions, handling numerical stability (including division-by-zero and floating-point tolerance), and reasoning about combinatorial permutations of numbers and operators.
Coding & AlgorithmsOnsite - SnapchatMediumSoftware EngineerDetermine blockage and parse HTML tokens
This question evaluates computational geometry and graph connectivity for the circular-stones subproblem and parsing plus tree data-structure manipulation for the HTML-like token subproblem, measuring skills in modeling spatial overlap, graph traversal/union operations, hierarchical DOM construction, and dynamic node insertion/deletion.
Coding & AlgorithmsOnsite