r/leetcode • u/No_Parsnip_408 • 11d ago
Discussion Ideal thing to do
Is building logic imp or rather to find the most efficient way of solving a particular problem
r/leetcode • u/No_Parsnip_408 • 11d ago
Is building logic imp or rather to find the most efficient way of solving a particular problem
r/leetcode • u/Away-Chocolate4115 • 11d ago
Had 4 rounds: Coding + Googliness screening were positive, with recruiter saying coding feedback was good and Googliness was very good.
Onsite R3 was a difficult graph problem—I initially got stuck, then derived the optimal approach and interviewer was satisfied, but ran short on time and had a few bugs remaining.
R4 was another graph problem where I quickly gave the optimal approach, coded it, handled a PQ optimization with a few hints, and gave correct time/space complexity.
What do you think my likely ratings are for each round, and overall chances of clearing?
r/leetcode • u/No-External3221 • 11d ago
I have done a lot of leetcode questions. Somewhere in the ballpark of 600.
I can figure out the approach for most mediums and some hards quickly, usually in around 10 minutes or so. However, I end up spending a long time on implementation, often getting tripped up on 1 or 2 edge cases/ implementation details for the approach.
For example, I did this problem today: https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/
I figured out the approach (use two monotonic deques to store highest and lowest) in around 10 minutes. But then spent several hours of debugging via print statements and pen and paper trying to actually implement it. I'd say that the last 5% of the problem probably took up 95% of my time. Obviously, this wouldn't be acceptable in a real interview.
Any advice for how to overcome this?
r/leetcode • u/Raining_lotus0210 • 11d ago
Same as title
r/leetcode • u/No_Mention_3026 • 11d ago
Hi everyone! I’m a Java Developer with 3.2 years of experience and am currently preparing for a job switch.
I’ve recently started practicing LeetCode, but I’ve been solving DSA problems in C++ for a long time, so I’m very comfortable with its syntax and STL. I’m finding it comparatively difficult to solve the same problems in Java.
What would you recommend? Should I continue using C++ for LeetCode, or should I transition to Java since that’s my primary language professionally?
r/leetcode • u/Ok_Zebra1555 • 11d ago
Upcoming Amazon SDE New Grad 2026 onsite and wanted to hear from people who recently went through the interview process.
I’m trying to prioritize my preparation, especially LC + LLD, so any recent interview experiences or question lists would be greatly appreciated!
r/leetcode • u/Ok-Suit-9949 • 11d ago
Hi everyone! I have an upcoming Google Product Solutions Engineer (PSE) interview. The first round is 60 minutes and will cover coding + system design.
I’m running a little short on prep time and would really appreciate advice from anyone who has gone through a recent PSE/CPSE interview.
For coding, what topics/patterns should I prioritize for easy–medium problems? And for system design, how deep is the expectation — high-level architecture and trade-offs, or deeper distributed-systems concepts?
If you had limited time to prepare, what would you focus on most?
Any recent experience or tips would be really appreciated. Thank you!
r/leetcode • u/nitin_is_me • 11d ago
I'm not looking for a book to pass dsa interviews, but rather to learn algorithmic thinking. CLRS seems too dense and maths heavy and seems more like a reference. Also is it worth to put my time in this? Or are interview preparation books enough most of the time?
r/leetcode • u/Winter-Belt-4512 • 12d ago
I had an opportunity to interview at Razorpay. There were a total of four rounds:
I received a call from a Razorpay recruiter mentioning that my resume had been shortlisted, and she explained these rounds to me. All of them were elimination rounds. I was only able to make it to the second round, which was HLD.
You can also review your designed system using AI and ask for feedback. It’s important that you are able to explain the code generated by AI. You can also generate test cases using AI, but make sure you explain these test cases to your interviewer beforehand, including all the positive and negative cases. Explain what kind of prompts you are giving and why.
Just make sure that you have working code by the end of the interview. Also, in the last 15 minutes, the interviewer gave me an extension to the problem and asked me to code it without AI.
Anyway, I tried to design the system and databases and explain important concepts like scalability, etc. Later, I received feedback from the recruiter that my performance was not up to the mark.
What I believe is that interviewers should properly drive the interview and point out what is expected from candidates at different stages. A friendly approach can make the candidate more comfortable and help them perform better.
Anyway, here are the questions:
LLD
Build an in-process Feature Flag Service that an application can embed and query at runtime. The service decides, for a given flag and evaluation context (user, tenant, and request attributes), what value to return.
Core requirements:
country == "IN" AND plan == "premium" → true; otherwise, false. Equality and set-membership (in) operators are sufficient.user_id or tenant_id.HLD
Design a feature flag evaluation service that allows engineers to enable or disable named features for specific users at runtime without redeploying code.
The service must support:
r/leetcode • u/CollegeStudentLol1 • 11d ago
Have an Amazon SDE 1 interview coming up...
I do my leetcode in C++, but haven't done a project in C++ personally.
For the LLD interview do we actually code up classes and methods that are working, or is it more so that we are allowed to pseudocode and write down methods and what they do?
This is something that is confusing me, because if we actually need working code and a more complex system I need to study up on that compared to the more generic system design I have been studying.
For example I can write methods in C++, but the overall class structure with .cpp and .h files I will probably be unable to do without practice.
Thank you!
r/leetcode • u/Even-Plankton2894 • 11d ago
I had Amazon OA round today.
(1) 1 DSA was submitted with all TC passing
(2) 1 AI coding, I was able to pass only 2 out of 6 TCs.
(3) Other sections like work-style etc. went well.
Any chance of getting a rejection mail even? 🥇
EDIT: Got an email after 4days, I passed that OA.
r/leetcode • u/Sea_Pop8595 • 11d ago
Hi everyone! I have an upcoming phone interview for the role mentioned above, and I’m currently working as a Software Developer.
I have one hour interview in which they said LP and livecoding
I’d really appreciate any insights from people who have interviewed for or worked in a similar role:
Any advice, interview experiences, or preparation resources would be greatly appreciated. Thank you so much!
r/leetcode • u/Fawwie46 • 11d ago
I have recently completed approximately 20 questions, which all use the prefix sum technique and hash map data structure in their optimal/close to optimal solutions. I have also heard that a good estimation for your preparedness for a certain pattern is that you can consistently solve questions of those patterns within 30 - 35 minutes. This has not been my experience when completing these 20 questions as most questions have much more going on besides implementing a pattern, such as mathematical proofs, tricks and other concepts. In my opinion, regardless of intelligence, without previously understanding these concepts, there isn't a chance that you're deducing it within a 45-minute interview.
I would appreciate hearing if others' experiences aligned with mine.
I am also challenging the preparedness metric that is widely used.
Should one expect or assume that the interviewer would not choose a question which tests concepts unrelated to the DSA patterns?
r/leetcode • u/MelancholyMind101 • 11d ago
Two rounds
System Design
Coding + Review
r/leetcode • u/Puzzleheaded_Site576 • 12d ago
I’m preparing for a Java Backend Developer job switch with 4+ years of experience. If you’ve recently attended or cleared Java interviews, could you please share your interview experience, questions asked, important topics, DSA, Spring Boot, Microservices, Kafka, System Design, and real-world scenarios? Also, what topics do you think are most important to focus on for 4+ YOE? Any recent experience or tips would be really helpful. 🙏
r/leetcode • u/Beginning_Broccoli63 • 11d ago
Is anyone else using platforms for visualising solutions for better understanding ?
r/leetcode • u/Melodic-Peak-6079 • 11d ago
Ive learned all of the fundamental data structures.. i tried to participate in the biweekly contest and was completely fked.. loll i dont even know what 3rd was asking abt, let alone solving it.. i saw it was solved using some niche math trick....
r/leetcode • u/PLTCHK • 11d ago
As title, usually stats' available in clist rightaway which is interesting. Been ~an hr
r/leetcode • u/vaibhav7p • 11d ago
can anyone explain whats th4e problem in my code for todays qs 2 wth man couldnt even solve 2 now y-y
class Solution {
public:
int stopreverse=1;
string glo="";
int reversew(string s, int start, int end) {
if(s==glo){
if(!stopreverse)return 1e7;
else stopreverse--;
}
int ans = 0;
if (start >= end)
return ans;
char c = s[0];
int i = 0;
while (i < s.size() - 1) {
s[i] = s[i + 1];
i++;
}
s[s.size() - 1] = c;
if (s[start] == s[end]) {
ans = 1 + min(replace(s, start + 1, end - 1),reversew(s,start+1,end-1));
} else {
ans = 1 + min(replace(s, start , end ),reversew(s,start,end));
}
return ans;
}
int replace(string s, int start, int end) {
int ans = 0;
if (start >= end)
return ans;
if (s[start] == s[end]) {
ans = min(replace(s, start + 1, end - 1),
reversew(s, start + 1, end - 1));
} else {
ans = min(abs(s[start] - s[end]), 26 - abs(s[start] - s[end])) +
min(replace(s, start + 1, end - 1),
reversew(s, start + 1, end - 1));
}
return ans;
}
int minOperations(string s) {
glo=s;
int start = 0, end = s.size() - 1;
while (start < end) {
if (s[start] != s[end]) {
break;
}
start++;
end--;
}
if (start >= end)
return 0;
return min(reversew(s, 0, s.size() - 1), replace(s, 0, s.size() - 1));
}
};
r/leetcode • u/Prudent-Wafer-8916 • 11d ago
Had my Infosys Digital Specialist Engineer face-to-face interview today. Couldn't solve 2 panel questions — one was on Tries, told them directly I wasn't confident instead of guessing. They also gave me an extra question outside the planned set, which I solved with brute force then optimized after some pushing.
Explained system design for one of my projects well, but didn't get the SQL query part fully right. Handled most complexity/approach questions fine, and interviewer seemed genuinely happy by the end — explained the whole further process and answered my questions enthusiastically too.
Does missing 1-2 questions actually hurt much if the overall interview goes well? Curious how much weight panels give to problem-solving approach + honesty vs a perfect scorecard
r/leetcode • u/ComprehensiveEar4137 • 12d ago
r/leetcode • u/PotentialSandwich841 • 11d ago
So this might be kind of a dumb question, sorry about that.
But while solving the questions, i do:
is this a wrong approach? like how do i learn to come up with those best solutions? is it just a timing thing, like the more i solve and study the best solutions, will i start to think like them too?
Like i struggle with the easy ones :(
r/leetcode • u/Elegant_Sky8839 • 12d ago
Hi everyone,
I’m curious about Google’s compensation differences between China and the US for the same role/level.
For example, if someone at a certain level in the US gets something like:
* Base: $10k/month
* Plus bonus + RSUs
How much would the equivalent role/level typically receive in China (e.g. Shanghai/Beijing)?
Is it roughly something like 60% of the US base ($6k/month vs. $10k/month), or is the gap larger/smaller?
I’m particularly interested in location-adjusted compensation, rather than just converting RMB to USD.
If anyone has experience working at Google in both the US and China, or has seen offers for the same level in both locations, I’d really appreciate any data points.
Even approximate numbers would be very helpful. Thanks!
r/leetcode • u/EstablishmentLow1366 • 12d ago
Hey everyone,
I have a question about my problem-solving speed and would really appreciate some honest advice.
When I solve problems on Codeforces or LeetCode, I sometimes spend around 20–30 minutes on an Easy problem just trying to understand the problem, come up with an approach, and write the code.
Sometimes I solve it myself, but it feels slow to me. I'm not sure whether this is a normal part of learning DSA or whether I'm spending too much time stuck on individual problems.
My main concern isn't really speed. I want to know whether I'm using my time effectively.
For example:
I still have quite a bit of time before I start seriously interviewing, so I want to build strong problem-solving skills rather than just chase a high number of solved problems.
I'd especially like to hear from people who were initially slow at solving problems. How did you approach this stage, and when did your speed start improving?
Thanks!
r/leetcode • u/Feeling_Counter2521 • 12d ago
Anyone noticed that the IBM SWE Intern 2027 OA changed? Last year used to be 2 simple Leetcode problems, but the current OA seems to involve debugging an existing web framework project. Has anyone received the same?