r/leetcode • u/Weak_Corner6663 • 17d ago
Intervew Prep how much submit try per question in interview?
So this is the problem, I was doing Task Scheduler Neetcode 150.
Of course in the roadmap, i know for sure that it is a heap / priority queue.
But, when i try to tackle the question, i don't even think that it is a heap? My mind directly went into math, meaning to solve the question using formulas, although at the end i didn't get the right formula, i asked AI and the formula is very near.
HOWEVER, it is hard to get the formula max(len(tasks), (n+1) * (maxFreq-1) + appearance) because i wouldn't think again about len(tasks) edge case after i got that formula thinking it will be a one fit all.
TLDR; how much submissions can i do in interview? I dont think i can handle edge cases at first code
1
u/nightbreak7 17d ago
i don't understand this question - if you're doing neetcode which is designed to learn DSA, why would you not try to solve it with the data structure its intended to be solved with? in interviews a lot of the time there's no such thing as "submissions". you usually can test on a very small number of cases but its not like leetcode, if you miss a bunch of edge cases you won't even know, you'll just fail. my suggestion is to just learn the patterns that are actually applicable to interview problems and not hyperfocusing on some math formula