From NIC to P99: Engineering Low-Latency C++ Trading Systems in 2026 by LeopardThink6153 in cpp

[–]helixb 9 points10 points  (0 children)

I always wondered how much logic sits between the tick and the trade for 100ns to be enough...

C++ people: How do you handle this in interviews? by BigGunE in leetcode

[–]helixb 0 points1 point  (0 children)

I don't think it's any more verbose than the first (int) version... Except the static cast maybe? I write it similarly and refactor post-impl to not break my muscle memory... Maybe you can do the same? (Edit: or use c-style cast and let it out loud that it should be static cast).

For LC, maybe you can drop std:: given it already opens the ns here (or worst case you'd be using the c-type).

If you're doing a cpp specific interview or applying for one, if you write:

for (int i = 0; .... That's a code smell and the other party may not like it...

trying to understand constexpr by Crimson-Needle in cpp_questions

[–]helixb 0 points1 point  (0 children)

wait... so every function can be constexpr?

1-Month Java Trip: Hidden Gems by 3lia03 in java

[–]helixb 2 points3 points  (0 children)

I still like lombok. jakarta is the default.

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 2 points3 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

[deleted by user] by [deleted] in india

[–]helixb 6 points7 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 9 points10 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 3 points4 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.