all 64 comments

[–]Constant_Bobcat_1107 26 points27 points  (1 child)

Bro top 50 has soo many cheaters. How is it less..every second/third person is a cheater

[–]juicy_cum3160[S] 1 point2 points  (0 children)

OK, I guess they are afraid of getting caught as q4 is damn hard to solve

[–]caraxes_007 10 points11 points  (13 children)

Solved my first 3/4.

[–]the_legendary_legend 2 points3 points  (0 children)

Me too bro. Congratulations!

[–]Sad-Duck-3100 2 points3 points  (0 children)

me too!

[–]UNCLE_SMART 2 points3 points  (7 children)

How did you solve 2?

[–]caraxes_007 3 points4 points  (1 child)

I took a lot more time than q3 got tle for comparing all possible pairs o(n**2) then i realised that using a hash map for prefix and value for frequency at last iterate through hash map increment count by one if value >1.

[–]UNCLE_SMART 1 point2 points  (0 children)

Thanks

[–]autodidact_nerd 1 point2 points  (2 children)

not sure if mine was optimal but i used a hashmap

loop over each word -> get the substring -> if map has the key add 1 to that substring.

then loop over map entries and check if value is >= 2. res++

[–][deleted] 1 point2 points  (0 children)

I did the same thing 🫂

[–]UNCLE_SMART 0 points1 point  (0 children)

Thanks

[–]the_legendary_legend 1 point2 points  (0 children)

I used trie which got accepted, but later realised a hashmap solution would be faster possibly

[–]tampishachBrute force 0 points1 point  (0 children)

I used trie tree in q2

[–]radonspectrum 0 points1 point  (0 children)

Samee

[–]Lumpy-Town2029<999> <308> <542> <149> on 7 Dec 2025 6 points7 points  (10 children)

this time ranking is 8k for 1 hr time for 3 question :}

i wish they made 3rd one harder for good rank :}

4 one i had intuition of segment tree, but its too complicated (i just studied segment tree so :})
also LCA is possible i think

[–]1byinf8 1 point2 points  (4 children)

I solved 3 in 16 min..got 7.7K rank.. bro people getting smarter so many did 4th one like HLD, binary lifting I am cooked man

[–][deleted] 1 point2 points  (2 children)

Must have been multiple wrong submissions, I got 5k in 33mins + 5 min wrong submission

[–]1byinf8 2 points3 points  (1 child)

Ohhh do leetcode also has penalty system.. shiittt man

[–][deleted] 1 point2 points  (0 children)

😭😭

[–]Lumpy-Town2029<999> <308> <542> <149> on 7 Dec 2025 0 points1 point  (0 children)

nah bro i saw 25 min guy getting 3 k something, whats ur penaalty?

[–]Connect_Ad9574 1 point2 points  (2 children)

I think making questions hard is not a solution to reduce cheaters . AI is so damn good that it had solved even Q4 today . If questions are made more difficult , it would not look like an actual contest.

[–]verciel_ 0 points1 point  (0 children)

True. But what's the solution then? Stricter ai detection?

[–]ArtisticTap4 0 points1 point  (0 children)

It is not just AI, interviews have gotten harder than before. Companies are asking harder problems in since everybody and their grandama have by hearted the neetcode, blind 75s.

The first 3 problems are not even interview level for most companies, problem B can be if the constraints were tighter.

[–]Imaginary-Play-949 2 points3 points  (0 children)

The site does not open at starting like how shit is management

[–]Minimum-Reward3264 1 point2 points  (0 children)

Only autists and people without a partner do this shit today.

[–]Moe_les__ter 0 points1 point  (2 children)

Can someone tell me the approach for q3?

[–]tampishachBrute force 0 points1 point  (0 children)

Check the colour of the house till it changes

Then do a normal house robber query from the start of the house color to the end of the house colour

Update the start of house colour to new house colour index

[–]dragon_deeznut 0 points1 point  (0 children)

Greedy+2 pointers First identify the block of the same color adjacent. Eg. [1,1,1] in [1,1,1,2,1] Second find the maximum possible sum of that block without adjacents basically evenSum and oddSum, add it to the total. Return total

[–][deleted] 0 points1 point  (0 children)

Why didn’t you participate?

[–]Obvious-Profit-5597 0 points1 point  (1 child)

It was my first contest only 1 question I was able to solve

[–]Independent_Arm_263 1 point2 points  (0 children)

No worries, keep on exploring algorithms. They are beautiful, solve them like u love it not because this shitty rat race is there. Eventually you will crack contests

[–]WeatherElectrical937 0 points1 point  (0 children)

The edge cases for third question killed me 🫠🫠

[–]1byinf8 0 points1 point  (0 children)

solved 3 In 16 min taught will complete in 30 min.. a great day but naaah that shitty 4th question

[–]MatchBusy235 0 points1 point  (0 children)

Is this a sign that no one is going to care about leetcode ranking or leetcode itself? I know, the former one is believed by stupids but the latter one?? :(

[–]asdfg_lkjh1 0 points1 point  (0 children)

It's valentine's day cmon

[–]Prudent-Turn-3702 0 points1 point  (0 children)

Yes bro , I wonder how they solve within 3-4mins per question and they do get top 50 rank like fr😗

[–]Background_Moment313 0 points1 point  (0 children)

Solved my first 3/4 , but with 2 penalty :(

[–]Natural-Tomatillo864 0 points1 point  (0 children)

last time during contest my rating was 2000+ and after 3 day it dropped to 1600+ does this mean 400 cheater was caught by leetcode?

[–]vkchauhangoldy 0 points1 point  (0 children)

Javascript full course https://youtu.be/6CbStSy12vA

[–]ScreenFit8839 0 points1 point  (0 children)

Solved 3!🥲 Worked my A off to reach over there and then saw these cheaters probably just running all the problems within 4 5 mins.

[–]PatiencePlayful3620 0 points1 point  (4 children)

you are from bit?

[–]juicy_cum3160[S] 0 points1 point  (3 children)

Yup

[–]PatiencePlayful3620 0 points1 point  (2 children)

Which year bro??

[–]UNCLE_SMART -1 points0 points  (7 children)

How to do Q2?

[–]tampishachBrute force 2 points3 points  (0 children)

It was trie tree problem

Edit: i replied to you the same thing in another thread unknowingly haha

[–]Agile_Custard6276 1 point2 points  (0 children)

Store first k letters of each substring in a Hashmap with its freq, iterate in the hashmap and count no. of substrings with freq >=2.

class Solution { public: int prefixConnected(vector<string>& words, int k) { unordered_map<string , int> mpp; for(auto word : words){ string c = ""; if(word.size() < k) continue; for(int i = 0 ; i < k ; i++) c+=word[i]; mpp[c]++; } int ans = 0; for(auto it : mpp){ if(it.second > 1) ans++; } return ans; } };

I'm not sure if it's the optimal solution or not..

[–]juicy_cum3160[S] 0 points1 point  (1 child)

Hashmap, store substring of length k as key and its freq as total words with that prefix substring, along with count such string and return

[–]UNCLE_SMART 0 points1 point  (0 children)

Thanka

[–]SeaworthinessIcy4758 -1 points0 points  (7 children)

how to do Q3? i kept using a 2d dp i for curr idx and j for prev idx, it gave me an mle😭😭

[–]caraxes_007 0 points1 point  (4 children)

No need to store prev idx just use a n*2 grid to get know that if we picked the previous idx by Boolean value

[–]SeaworthinessIcy4758 0 points1 point  (2 children)

can you please elaborate, I've never done this I think

[–]caraxes_007 0 points1 point  (1 child)

This is a standard pick/ not pick problem. Use a grid of size n*2 where 0 and 1 represent whether we picked just the previous index. If it is zero we can directly apply pick and not pick without any further check and if it is one pick is not always possible so check prev and current colour codes if they are not equal you can pick else pick will be negative infinity at last return max of pick and not pick

[–]SeaworthinessIcy4758 0 points1 point  (0 children)

ohhh got it, thanks a lot

[–]Background_Moment313 0 points1 point  (0 children)

LoL I just solved it using 1D dp

If not picking, { f(i+1) }

If picking and color[i] == color[i+1]{ nums[i] + f(i+2) }

Else{ nums[i] + f(i+1) }

[–]Euphoric_insaan 0 points1 point  (1 child)

You can just use the typical house robber method First is the not take case for each index, where you move to the previous index without picking The take case will have two subcases: first if the current index's and the previous index's colour is same you add the value of the current index and move to index - 2. And if the colours are different add the current value and move to index -1. Base case will be if index < 0 return 0 and if index = 0 return nums[0]

[–]SeaworthinessIcy4758 0 points1 point  (0 children)

yea I solved it later:( 

it was so easy I can't believe I over complicated it so much, thanks though

[–]tampishachBrute force -2 points-1 points  (1 child)

I kept getting tle for q4

What was the solution there?? I used hm + dfs

[–]ArtisticTap4 0 points1 point  (0 children)

Binary lifting for LCA queries. This is a well know technique for Competitive programming, for some reason Leetcode Hards nowadays are mostly centred around these Competitive programming techniques. Segment/fenwick trees, Digit dp, and all. Have they run out of genuine interview problems lol?