ALGODAILY
  • All Courses
  • Premium 50% Off
  • Testimonials
  • Company
    Learn About Us Sample Newsletter AlgoDaily Blog Youtube Channel Contact Us Privacy Policy Terms and Conditions
  • Login
  • Sign Up
  • Resources
    AlgoDaily Video Library Company Interview Reports All Interview Challenges Tech Interview Flash Cards Generate a Custom Course AlgoDaily Book: Core Essentials Latest Additions

Community

Start a Thread
Filters
All Threads
Answered
Unanswered

By Category
All
Career
Challenges
Feedback
General

Max-heap trick for “Nth Smallest Number in a Stream” + edge cases

Challenges • Last reply from Sarah Chen at July 20, 2025 at 2:16PM UTC

For the AlgoDaily challenge “Nth Smallest Number in a Stream,” a clean approach is a size-N max-heap: Keep a max-heap of the N smallest numbers seen so far. On each new value x: If heap size < N, push it. Else if x < heap.max, pop max and push x. ...

1 post

Dollar Sign Deletion — simple stack vs O(1) two-pointer

Challenges • Last reply from Jun at July 4, 2025 at 2:16PM UTC

Anyone else find Dollar Sign Deletion easiest to reason about with two angles? Single string transform: iterate once, treat result as a stack . Push letters, pop on '$'. Compare-two-strings variant: walk from right to left with skip counters; no e...

1 post

'Implement ClearAllTimeouts' — what's the intended approach?

Challenges • Last reply from Ben at June 30, 2025 at 2:16PM UTC

Working on the Implement ClearAllTimeouts challenge and I’m unsure what’s expected. I tried two approaches: Brute force : const max = setTimeout => {}, 0); for clearTimeout; Issues: race-y, browser quirks with intervals, doesn’t work in Node wh...

1 post

Real-world strategies for zero-downtime doc DB schema changes

Challenges • Last reply from Sarah Chen at June 21, 2025 at 2:16PM UTC

The “Enhancing your Document-Oriented Database” lesson was a solid refresher on indexing and validation. Curious how folks here handle live schema evolution in production without outages. What’s worked well for me: - Add schemaVersion to every doc...

1 post

Majority Element - Python - Description Question

Challenges • Last reply from Sarah Chen at July 20, 2025 at 2:16PM UTC

the solution mentinons sorting ). instead we can use dictionary/hashmap sorting in O, n = number of elements searching for majority element O at worst case, m = number of keys of dictionary where m < n overall we are doing it in O, linear time `d...

4 posts

Sum until one digit

Challenges • Last reply from Jun at July 20, 2025 at 2:16PM UTC

Here's what I got for the solution function sumDigits { let n = num % 9; if { return 9; } else { return n; } } The challenge says expected time complexity to be O, but unless I'm missing something here. This is O isn't it?

4 posts

Two-Coloring Graph (Bipartite): quick checklist + a pitfall

Challenges • Last reply from Team AlgoDaily at July 20, 2025 at 2:16PM UTC

Working through AlgoDaily’s “The Two Coloring Graph Problem”? Here’s the pattern I reach for and a couple gotchas I keep seeing. Checklist: - Treat it as bipartite check. Use BFS/DFS to color 0/1. - Handle disconnected graphs: start from every unc...

2 posts

Sum Digits Until One

Challenges • Last reply from Team AlgoDaily at July 20, 2025 at 2:16PM UTC

Hi, guys! I have a question about "Sum Digits Until One" problem. When I run the code for all the test cases everything is perfect, but when I click 'RUN TESTS' button, it gives me an error: 4 ) ) ) Here is the code: def sumDigits: if n <...

10 posts

New challenge: Closures and Dependency Injection

Challenges • Last reply from Pat Kumar at July 12, 2025 at 2:16PM UTC

This week’s challenge is live: Closures and Dependency Injection. Prompt: - Implement makeCounter -> returns { inc, get }. - Use a closure to keep state. No globals or static module state. - inc increments the count and calls logger. - get returns...

2 posts

Lowest Common Ancestor - Python Question

Challenges • Last reply from Jun at July 4, 2025 at 2:16PM UTC

Test case tree2 is not valid. tree2 cannot represent a binary search tree since tree2 = Node tree2.left = Node tree2.right = Node violates the fact that left child should be smaller than root, but here left child is greater than root since 10 > ...

2 posts
  • ← Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • 20
  • 21
  • Next →