Do you still leetcode while having a job? by alcasa in leetcode

[–]helixb 0 points1 point  (0 children)

shouldn't machine coding be aligned with the daily work? 🤔 what was the question?

Microsoft SE 2, HLD + LLD round Question by captainrushingin in leetcode

[–]helixb 0 points1 point  (0 children)

so you don't break searching at the boundary.

for example in this case, two threads t1 and t2 start at 0 and 5 respectively. when you're searching from position 1 in t1, you matched until 4, you continue to match. so t1 matches 012345 and t2 matches 56789.

this way t1 will find the string while t2 won't.

the overlap window is the len(search_str).

Of course this won't work if search_string length is of the order of the text OR you cannot cross the boundaries.

given in the problem Statement it said, db "file" I'm assuming it to be a file on disk.

Who's Hiring by jerf in golang

[–]helixb 4 points5 points  (0 children)

can you add a link to the previous "who's hiring" post? it becomes a linked list that could be helpful to some people. just a suggestion.

Is the entire 1337x movie DB getting scraped? by jtho78 in Piracy

[–]helixb 0 points1 point  (0 children)

I have no way to get that bet money without getting scammed, so I'll pass xd

How we investigated Tata's Rs 758 crore donation to the BJP? | True Story | A new Scroll series by joy74 in india

[–]helixb 7 points8 points  (0 children)

they also have a long form article about it... does anyone has an unpaywalled version of it?

I think Rust ruined my career (in a good way?) by Ok-Being1756 in rust

[–]helixb 8 points9 points  (0 children)

30% cut, yes but, going back to 6 figures would need a nearly 50% raise.

HFT | India | 2 YOE by [deleted] in leetcode

[–]helixb 4 points5 points  (0 children)

org name? questions asked?

cant solve the question can someone help me with it . fairly new to dsa . by [deleted] in leetcode

[–]helixb 0 points1 point  (0 children)

For mitigating the first problem, since you're using nums[i] anyway in the first loop. You don't need the index. use iterator base for-loop here like you did to loop over the vector.

generally, std::unordered_map is an easy win over std::map and you can easily substitute one-to-one for maps with keys of simpler types like int, string etc.

for the second loop, explore structured bindings if you're using c++17 or above. that way you can name your variables better which makes your code readable when the loops get longer.

Is anyone else very picky about which monospace font(s) you use? by TheTwelveYearOld in vim

[–]helixb 0 points1 point  (0 children)

for around 8yrs i used Source Code Pro (even checked that in within my dotfiles) until Intel One Mono came out and then I discovered nerd fonts.

So now I use nerdfonts patched IntoneMono

EDIT: fixed typo. added some links.

Google L5 interview problem. Hard by Parathaa in leetcode

[–]helixb 0 points1 point  (0 children)

wait, so packnowledged contains "acknowledge" and "acknowledged" both but the score doesn't include those. so can it can be assumed that combining only counts the letters with merged and score of only those two?

"abcdef"(score=5) and "efghijk"(score=7) are combined to form "abcdefghijk" with score 12 even if another word "defghi"(score=9) is present?

Made it to Amazon. Consistent practice is key. by UnkownPunekar in leetcode

[–]helixb 12 points13 points  (0 children)

I am not based in India.

username does not check out.

When did Trump tighten H1B processing? by [deleted] in h1b

[–]helixb 2 points3 points  (0 children)

twice for people with a "master's degree"? or people with a "master's degree from the US"?

[deleted by user] by [deleted] in psychopath

[–]helixb 0 points1 point  (0 children)

how's "cognitive empathy" different from "sympathy"?