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 2521–2550 of 3276 results
- SalesforceMediumSoftware EngineerConvert integer to NAF form
This question evaluates understanding of number representations (Non-Adjacent Form), bit-level optimization, and formal proof techniques for demonstrating minimal Hamming weight, together with algorithmic complexity analysis.
Coding & AlgorithmsOnline Assessment - SalesforceMediumSoftware EngineerCount the Steps at Which Set Bits Form an Exact Prefix of Ones
Array problem: the bits of an all-zero binary string are set one at a time in the order given by a permutation; count the steps after which exactly the first i bits are set. It tests careful reasoning about prefix conditions and handling large inputs efficiently.
Coding & AlgorithmsOther - SalesforceMediumSoftware EngineerCount the Ways to Split a Digit String into Primes
Tests 1D dynamic programming combined with primality testing to count valid partitions of a digit string into prime segments modulo 10^9 + 7.
Coding & AlgorithmsOnsiteDynamic ProgrammingMathNumber Theory - SalesforceMediumSoftware EngineerDelete Every Value That Repeats in an Unsorted Singly Linked List
Linked list problem: delete every node whose value occurs more than once in an unsorted singly linked list, removing all copies and keeping the remaining nodes in their original order. It tests frequency counting, list traversal and careful handling of removals, including at the head of the list.
Coding & AlgorithmsOther - SalesforceMediumSoftware EngineerDelete One Character Type to Minimize Unique Segments
Determine which single character type to delete from a string so that greedily partitioning the remaining characters into substrings with all-unique characters yields the minimum number of segments.
Coding & AlgorithmsOnline Assessmentgreedystringhash-table - SalesforceMediumSoftware EngineerDesign O(nm) grouping of rearranged strings
This question evaluates a candidate's understanding of string manipulation, hashing and frequency-count techniques, algorithmic optimization, and time/space complexity analysis when grouping anagrams.
Coding & AlgorithmsTechnical Screen - SalesforceMediumSoftware EngineerDetermine minimal substitutions and removals
This question evaluates string manipulation and adjacency-constraint handling in the first task and sequence analysis with minimal-removal and subsequence reasoning in the second, targeting competencies such as local transformation logic, subsequence recognition, and optimization under input constraints.
Coding & AlgorithmsOnline Assessment - SalesforceMediumSoftware EngineerDiameter of an Undirected Tree
Tests your ability to traverse an unrooted, undirected tree to compute its diameter (longest simple path) in linear time and space.
Coding & AlgorithmsOnsitetreegraphbfs - SalesforceMediumSoftware EngineerFewest Add-or-Subtract Power-of-Two Steps to Reduce n to Zero
An integer problem: reduce a positive n to zero with the fewest operations, where each operation adds or subtracts a power of two. It tests reasoning about binary representations, proving a strategy optimal, and working safely with integers larger than 32 bits.
Coding & AlgorithmsOnline Assessment - SalesforceMediumSoftware EngineerFewest Repeat-Free Pieces After Deleting Every Copy of One Letter
A string problem: delete every occurrence of one chosen lowercase letter, then split what remains into the fewest contiguous pieces with no repeated letters. It tests reasoning about optimal partitions, evaluating every deletion choice efficiently, and edge cases on strings up to 200,000 characters.
Coding & AlgorithmsOnline Assessment - 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 All Balanced Parenthesis Strings with n Pairs in Sorted Order
Return every balanced string made of n opening and n closing parentheses, for n up to 8, sorted in ascending lexicographic order. It tests systematic generation of combinatorial strings under a validity constraint, with an exact canonical ordering of the output.
Coding & AlgorithmsTechnical Screen - 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 - SalesforceMediumSoftware EngineerImplement 64-bit modular exponentiation safely
This question evaluates proficiency in modular arithmetic, safe 64‑bit integer operations, and algorithmic techniques for overflow‑resistant modular multiplication and exponentiation.
Coding & AlgorithmsTechnical Screen - 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 - SalesforceMediumSoftware EngineerImplement a traffic-light UI with JS
This question evaluates front-end web development competencies, including DOM manipulation, CSS-driven UI state, JavaScript timing and asynchronous state management for interactive components.
Coding & AlgorithmsTechnical Screen - 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 EngineerMaximal Square and Longest Increasing Subsequence
This problem tests proficiency with 2D dynamic programming for geometric pattern recognition and 1D dynamic programming for sequence optimization.
Coding & AlgorithmsTechnical ScreenDynamic ProgrammingBinary SearchMatrix - SalesforceMediumSoftware EngineerMaximize events attended given date ranges
This problem tests your ability to solve a classic greedy interval scheduling variation by using sorting and a priority queue to maximize overlapping resource utilization.
Coding & AlgorithmsTechnical ScreenGreedyHeapSorting - 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 EngineerMinimize steps to reduce integer
This question evaluates algorithm design skills and proficiency with integer operations and decision-making under parity constraints, testing competencies such as bitwise reasoning, greedy and dynamic-programming intuition, and complexity analysis.
Coding & AlgorithmsTechnical Screen - 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 - SalesforceEasySoftware EngineerRemove duplicates and find constrained longest subsequence
This problem tests your ability to manipulate linked structures to remove duplicates and your algorithmic efficiency in finding the longest string that satisfies two distinct containment constraints.
Coding & AlgorithmsOnline AssessmentLinked ListStringsSubsequence - SalesforceMediumSoftware EngineerRemove duplicates from a singly linked list
This question evaluates understanding of singly linked list data structures and in-place node manipulation to remove repeated values while preserving relative order, testing competencies in pointer management and duplicate-detection.
Coding & AlgorithmsHR Screen