@greghogg5: Python Counter / Defaultdict / Dictionary #java #software #softwarejobs #softwareengineer #datastructures #leetcode #programming #javadeveloper #datastructuresandalgorithms #python #softwaredeveloper #code #FAANG #coding #javascript #javascriptdeveloper #codingisfun #codinginterview #js #html #css #sql #stem #science #computerscience

Greg Hogg
Greg Hogg
Open In TikTok:
Region: CA
Monday 04 November 2024 16:00:00 GMT
20196
785
8
16

Music

Download

Comments

aaaaaghsh
AAAAAGHSH :
is it actually faster or is the code just hidden in a library
2024-11-05 22:44:37
3
colint811
Colint :
Using unordered map in cpp for that is also easy
2024-11-06 07:06:27
0
evliccu
Levi :
that defaultdict is the same as map in c++
2024-11-05 16:26:31
0
freyj1031
freyj1031 :
There’s a Counter class in python that does this instantly, or you can use reduce
2024-11-05 11:06:48
1
jayjstrut
Jay Strut :
JS go brrr in 1 line: let dict=str.split(“”).reduce((a,b)=>a[b]=a[b]+1||1,{})
2024-11-05 06:03:59
0
To see more videos from user @greghogg5, please go to the Tikwm homepage.

Other Videos


About