r/NeetCode • • Mar 11 '25

Alien Dictionary with no defined order

2 Upvotes

When I submit my code, it fails on a test case where the input is

words=["abc","bcd","cde"]

In the submition, I get the expected results to be edabc.

But actually, d and e order is unknown. We know that a > b > c but have no hint regarding d and e.

In the proposed solution from the site, they take all the letters in a queue then perform some kind of DFS or Topological Sort, which causes d and e to be placed at the beginning without any real reason.

Since there are no hints regarding the order of d and e, I believe the expected result should be an empty string "".


r/NeetCode • • Jan 29 '25

Are any coupons available for lifetime subscription?

2 Upvotes

It is $500 for lifetime subscription. If you have any coupon to bring the cost down, please let me know.


r/NeetCode • • Aug 09 '24

Amazon applied science interview coding prep

2 Upvotes

Hey guys,

Can you please help me know what kind of problems I need to practice for amazon applied science interview prep.

I am basically looking for a list of problems I need to prepare like the usual on NeetCode channel.

Is there something specifically curated for Amazon Applied Science Interviews geared more towards ML rounds and general coding questions specific to this interview.

Thanks!!


r/NeetCode • • 29d ago

Time complexity?

Post image
1 Upvotes

Is the time complexity really o(n)?
I suspect it might be quadratic - but I can't prove it.
Can someone give me their proof please!


r/NeetCode • • Oct 14 '26

Coding ide is slow

1 Upvotes

r/NeetCode • • Jul 28 '26

Rivian and Volkswagen Group Technologies Software Engineering Intern - System Integrations review

Thumbnail reddit.com
1 Upvotes

r/NeetCode • • Jun 28 '26

I need help.

Thumbnail reddit.com
1 Upvotes

r/NeetCode • • Jun 06 '26

Missing link to Leetcode question?

1 Upvotes

I am accessing Neetcode after a long time. I remember there used to be a link for each practice question that opens the actual leetcode question on leetcode.com

I see it's no longer there. Is that the case? If so, bummer!

I see neetcode now has the code execution and all. Its cool, but I just want to run my code against the extensive test cases leetcode provides.

EDIT: Looks likes its solved. Now I see 2 options when clicking "Open in New Tab" - Neetcode or external site. I am not sure if I missed it or it was a temporary issue. Anyways its solved now.


r/NeetCode • • May 10 '26

How can I get a curated list of star marked questions in Neetcode?

1 Upvotes

I'm on the free plan. I searched a lot but couldn't find an option to see all star marked questions in my profile or filters or anywhere else


r/NeetCode • • Apr 16 '26

Leetcode or Neetcode

Thumbnail reddit.com
1 Upvotes

r/NeetCode • • Apr 15 '26

Why is "Optimized" Brute Force still called O(n^2)?

Thumbnail reddit.com
1 Upvotes

r/NeetCode • • Apr 13 '26

I made a app for Neet students

Thumbnail reddit.com
1 Upvotes

hey there I made a full Neet app for practicing and it's in the process. I am thinking of add more features and I think I made a great design but i want to know your opinion so pls suggest me


r/NeetCode • • Feb 12 '26

Bruh WTF is happening in BLR!Witnessed Tarun & MD sir😨😳 Spoiler

Post image
1 Upvotes

r/NeetCode • • Jan 20 '26

LC 139 "Word Break" - Time complexity confusion

1 Upvotes

LC link: https://leetcode.com/problems/word-break/description/

NeetCode link: https://neetcode.io/problems/word-break/question

In the solution section at NeetCode, the time complexity for "DP with Trie" approach has been stated as O((n*t*t)+m) but in my solution I am seeing it as O(n*t+m*t)

Here is my JS code:

class Solution {
    /**
     *  {string} s
     *  {string[]} wordDict
     * u/return {boolean}
     */
    wordBreak(s, wordDict) {
        /**
        For complexity analysis

        n = the length of the string 
        m = the number of words in wordDict
        t = the maximum length of any word in wordDict
        */

        // BUILDING
        let trieRoot = { next: {} };
        for (const word of wordDict) {
            let cur = trieRoot;
            for (const ch of word) {
                cur.next[ch] = cur.next[ch] || { next: {} };
                cur = cur.next[ch];
            }
            cur.hasWord = true;
        }
        /**
        Complexity of building = O(m * t)
        */
        
        // DP cache
        const canBreakSubStringFrom = new Array(s.length).fill(false);
        
        // SEARCHING
        for (let start = s.length - 1; start >= 0; start--) {
            let sIdx = start;
            let cur = trieRoot;
            
            while (sIdx <= s.length && cur) {
                if (cur.hasWord
                    && (sIdx == s.length 
                        || canBreakSubStringFrom[sIdx])) {
                    
                    canBreakSubStringFrom[start] = true;
                    break;
                }

                cur = sIdx < s.length ? cur.next[s[sIdx]] : undefined;
                sIdx++;
            }
        }
        /**
        Complexity of searching = O(n * t)
        */

        /**
        Total complexity = O(mt + nt)
        */

        return canBreakSubStringFrom[0];
    }
}

What am I missing?


r/NeetCode • • Dec 31 '25

Improvement Suggestion

1 Upvotes

I think adding a feature where you get to track your understanding of a problem would be great, since it allows the user to keep track of certain problems they're struggling with.

I currently use Notion to keep track of my understanding but it would be great if I didn't have to go back and forth between NeetCode and notion.


r/NeetCode • • Aug 18 '25

Chatgpt Rappi 6 Month Promo Code

Thumbnail
gallery
1 Upvotes

Only interested people msg me personally.


r/NeetCode • • Jul 30 '25

How to Tackle the Neetcode 250

Thumbnail reddit.com
1 Upvotes

r/NeetCode • • Feb 17 '25

Can't make any code run in neetcode

1 Upvotes

I'm new to the community. Just started Neetcode and can't seem to get any code to run. I get the following error message when running the code for a simple problem. It's the example code given for the solution, so I know it should compile and run fine. I'm probaby missing something really obvious, so apologies in advance. Any help appreciated.

compile output:

MSBuild version 17.7.1+971bf70db for .NET
Determining projects to restore...
Restored /box/Main.csproj (in 38 ms).
/box/Main.cs(9,27): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(9,27): error CS1525: Invalid expression term '<' [/box/Main.csproj]
/box/Main.cs(9,40): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(9,40): error CS1525: Invalid expression term ',' [/box/Main.csproj]
/box/Main.cs(11,31): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(11,31): error CS1525: Invalid expression term '<' [/box/Main.csproj]
/box/Main.cs(11,44): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(11,44): error CS1525: Invalid expression term ',' [/box/Main.csproj]
/box/Main.cs(20,16): error CS1002: ; expected [/box/Main.csproj]

Build FAILED.

/box/Main.cs(9,27): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(9,27): error CS1525: Invalid expression term '<' [/box/Main.csproj]
/box/Main.cs(9,40): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(9,40): error CS1525: Invalid expression term ',' [/box/Main.csproj]
/box/Main.cs(11,31): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(11,31): error CS1525: Invalid expression term '<' [/box/Main.csproj]
/box/Main.cs(11,44): error CS1002: ; expected [/box/Main.csproj]
/box/Main.cs(11,44): error CS1525: Invalid expression term ',' [/box/Main.csproj]
/box/Main.cs(20,16): error CS1002: ; expected [/box/Main.csproj]
0 Warning(s)
9 Error(s)


r/NeetCode • • Nov 24 '24

Why Do FAANG Interviews Rely on LeetCode?

1 Upvotes

Are you preparing for FAANG interviews or wondering why companies like Amazon, Google, Apple, Netflix, Microsoft, and Meta emphasize LeetCode problems? You're not alone. Many feel these coding challenges are detached from real-world engineering.

This article goes into the following:
βœ… The actual skills FAANG looks for in SDEs.
βœ… Why LeetCode-style problems remain relevant in interviews.
βœ… How these assessments test more than just theory.
βœ… A glimpse into the future of coding interviews with AI.

Whether you’re an aspiring engineer or just curious about Big Tech hiring practices, this post will give you new insights!

πŸ“– Read it here: https://mastermentee.substack.com/p/why-do-faang-interviews-rely-on-leetcode

What’s your take? Are LeetCode problems a necessary evil or a relic of outdated hiring practices? Share your thoughts in the comments! πŸš€ - MasterMentee


r/NeetCode • • Nov 23 '24

Drawing Tool

1 Upvotes

What drawing tool / software does neetcode use? Also Does he use a drawing pad or just mouse?


r/NeetCode • • Jun 13 '25

[Urgent] Need Help solving this problem

0 Upvotes

Hello, I am doing an assessment for a job and I am not very good at leetcode. If anyone is online can you please help me solve a problem? Plz, I really need a job, and you will get infinite positive karma.. πŸ˜­πŸ™πŸ™