u/sosogg_4

▲ 0 r/cpp

Feeling good

I was deep diving into c++
i started from smart pointers
learning about them indepth...deviated to learning about move operator and its implemention inside classes
and learned about NRVO (Named Return Value Optimization) while understanding move operator in depth
This journey really enlightened me; all those small doubts we get clarifed along the path it really makes me happy

finally feeling happy 😄

Never stop asking why +> you will always learn some thing new

reddit.com
u/sosogg_4 — 4 days ago
▲ 1 r/typing

Need advice

I have been trying to master touch typing for some time.
I have mastered all the punctuations and alphabets.
but while trying to learn numbers, one issue i constantly feel is

unable to reach 1,9,0 keys .......until now i dont move my wrists; just finger movements would be sufficient at all but to reach these keys, I feel like i need to move my hand (may be because of short pinkie fingers)

do you guys too move your wrists or hand while typing these or just moving fingers sufficient??
Also, do you guys rest your wrist or keep it in air

reddit.com
u/sosogg_4 — 4 days ago

I was solving some problems which required hashing two 2d lattice points
which lead to Cantor pairing Szudzik pairing

(a + b) * (a + b + 1) // 2 + b -> cantor pairing 

  if a >= b:
        return a * a + a + b
    else:
        return b * b + a       -->  Szudzik pairing

both of these look like just simple equations, and proofs of these two just blown my mind away.

Read about them, guys, if you are interested.

reddit.com
u/sosogg_4 — 15 days ago