cswork / libraryOpen practice workspace

READ. UNDERSTAND. PRACTICE.

Coding questions

Explore algorithm tutorials, coding and system design questions, interview experiences, and computer science study guides.

1,899 resources · Page 20 of 80

  1. Coding questions · Pinterest

    Count Distinct Active Pins per Time Segment from Overlapping Interaction Logs

    Given pin interaction logs with start and end times, count how many distinct pins are active in each time segment when the same pin can have many overlapping intervals from different users. Tests interval processing over arbitrary timestamps, deduplication by pin, and precise half-open boundary handling.

  2. Coding questions · Roblox

    Count Distinct Hat Assignments and Maximize Hat Points

    Count valid one-hat-per-person assignments and maximize assigned-hat points with exact counts, unique hat use, and bitmask or backtracking reasoning.

  3. Coding questions · Quora

    Count distinct palindromic subsequences

    This question evaluates proficiency in string algorithms and combinatorial counting, focusing on recognition and enumeration of palindromic subsequences and techniques for deduplicating distinct results.

  4. Coding questions · Meta

    Count Distinct Values in a Sorted Array When K Is Small

    Count distinct values in a sorted array efficiently when the number of unique values is much smaller than the array length. The challenge tests adapting complexity to output diversity rather than raw length, meeting an O(k log n) target with constant auxiliary space, and handling empty or uniform arrays.

  5. Coding questions · IBM

    Count Employees With Unbroken Renewable Access at the Last Timestamp

    A simulation problem about an access system where each employee's access lasts a fixed duration after every setting and can be extended only while it is still active. It asks how many employees hold valid access at the last timestamp, testing exact expiry boundaries, permanent lapses and per-employee state.

  6. Coding questions · Sig

    Count Equal-Difference Triples After Each Add or Remove-All Operation

    Process a stream of add-one and remove-all operations on a multiset and report, after each operation, how many element triples form an arithmetic progression with a fixed positive difference. It tests efficient incremental updates, correct treatment of duplicate occurrences, and counts that exceed the 32-bit range.

  7. Coding questions

    Count Failing, Passing and Distinction Scores from Percentage Thresholds

    Given an array of student exam scores as percentages, count how many students failed with under 50, passed with 50 to 80 inclusive, or passed with distinction above 80, and return the three counts in order. It tests careful handling of inclusive and exclusive boundaries and empty input.

  8. Coding questions · Bloomberg

    Count friend requests based on age rules

    This question evaluates algorithmic problem-solving skills involving array processing, counting and combinatorics under conditional constraints and frequency handling.

  9. Coding questions · HackerRank

    Count Good Subsequences With Equal Character Frequencies

    Practice a combinatorics coding problem that counts good subsequences where every selected character has the same frequency. The prompt targets frequency counting, combinations, modular arithmetic, and grouping subsequences by common selected count.

  10. Coding questions · Vercel

    Count Hits in the Past Five Minutes

    Implement a five-minute hit counter with ordered timestamped operations, repeated hits, and an explicit 300-second expiration boundary.

  11. Coding questions · ByteDance

    Count House Segments After Sequential Demolitions

    Track the number of consecutive house segments after each requested demolition on an integer line. Each removal can eliminate an isolated segment, trim an endpoint, or split a run, so the solution must update the count efficiently across many distinct positions.

  12. Coding questions · IBM

    Count Index Triplets Whose Max Minus Min Is at Most d

    A counting problem that asks how many triplets of positions in an integer array have a spread, the largest value minus the smallest, of at most d. It tests handling duplicates and inclusive bounds, producing a count that can exceed 32 bits, and meeting time limits for arrays of up to 100,000 elements.

  13. Coding questions · Squarepoint

    Count Index Triplets With an Even Product Modulo a Given Number

    From a Squarepoint technical screen: count the triplets of distinct positions in an integer array whose three values have an even product, and return the count modulo a given number. It tests efficient counting on large inputs, parity with zero and negative values, and remembering to apply the required modulo.

  14. Coding questions · Microsoft

    Count integer pairs satisfying 1/x + 1/y = 1/N

    This question evaluates understanding of number theory and algorithmic problem-solving, focusing on Diophantine equation manipulation, divisor counting, and translating algebraic constraints into combinatorial counts.

  15. Coding questions · Agoda

    Count Integers That Appear Exactly Once

    Count distinct integers with frequency exactly one using complete occurrence counts, including empty arrays and separated duplicates.

  16. Coding questions · Oracle

    Count Interior Islands After Flooding

    This question evaluates understanding of grid-based graph traversal and connected-component detection, focusing on flood-fill logic and the treatment of boundary-connected regions in a binary grid.

  17. Coding questions · MathWorks

    Count interval intersections

    This question evaluates understanding of interval relationships, efficient counting under large constraints, and algorithmic complexity analysis for overlapping ranges.

  18. Coding questions · Applovin

    Count invalid nodes in a BST

    This question evaluates understanding of binary search tree invariants and the ability to identify nodes that violate ancestor-imposed value ranges, testing competency with tree data structures and constraint propagation in the coding & algorithms domain.

  19. Coding questions · Hudson River Trading

    Count inversions in a permutation

    This question evaluates understanding of inversion counting in permutations, testing algorithmic problem-solving, complexity analysis, and data-structure reasoning about pairwise order relations.

  20. Coding questions · Kneron

    Count IoT devices matching date and threshold

    This question evaluates handling of paginated REST APIs, JSON parsing and nested-data filtering, month/year date parsing, and numeric threshold comparisons, reflecting skills in data retrieval and programmatic data manipulation.

  21. Coding questions · LinkedIn

    Count islands and distinct shapes

    This question evaluates a candidate's understanding of grid-based graph traversal and connected-component detection, along with the ability to recognize and canonicalize distinct island shapes.

  22. Coding questions · Oracle

    Count Islands and Return the Largest Island Size

    Count four-connected islands and find the largest island using DFS or BFS, with correct visited-state handling and all-water behavior.

  23. Coding questions · Samsung

    Count islands in a binary grid

    This question evaluates a candidate's ability to analyze grid-based data structures and identify connected components, testing spatial adjacency reasoning and state management within 2D arrays.

  24. Coding questions · TikTok

    Count islands on a torus grid

    This question evaluates skills in graph and grid algorithms, topology-aware adjacency (torus wrap-around), and maintaining dynamic connectivity under incremental updates.