@greghogg5: Google Interview Question - Valid Anagram! #leetcode #coding #programming #codinginterview #softwareengineer #datastructures #datastructuresandalgorithms #FAANG

Greg Hogg
Greg Hogg
Open In TikTok:
Region: CA
Thursday 07 December 2023 13:00:00 GMT
40802
2046
44
20

Music

Download

Comments

yeahitsjoyce1
Ligma :
I got this in my google interview
2023-12-30 18:36:46
5
ferskt.egg
Ferskt Egg :
clever solution, but it's important to note the context. While hashmaps have better O they come with overhead and might be slower for most words...
2023-12-07 16:39:27
13
stephenscript
StephenScript :
Comparing length of strings is another way to improve efficiency, as anagrams always have the same length. Time complexity overall is the same tho.
2023-12-18 09:54:04
0
theveggiesinyourfridge
Jameson | CLT :
Easy! (Sarcasm)
2024-01-06 07:58:29
3
honeydew.py
Bottles :
Love the way you explain each line of code beautiful ❤️
2024-01-03 14:25:52
0
userhjxphfl0um
Codaaaaa~ :
Use an array that is 26 long, one for each letter of the alphabet. Hashmaps are often bad for performance.
2023-12-07 17:36:55
11
fezza.90
Luke Ferrier :
assuming constant alphabet size we can use a O(|A|) array where A is our alphabet to store occurrences. This takes less space than a hashmap
2023-12-09 09:58:51
1
andreitibrea
Andrei Tibrea :
you can solve the isAnagram with one for
2023-12-13 17:09:38
0
symnsez
SymnSez :
Try-catch with pop, if pop errors then false, or if completes with non-empty, then also false, otherwise true
2023-12-11 23:32:06
1
monzleeb
user3334964209245 :
Why is that the right answer they didn’t say the most efficient way
2023-12-12 01:56:47
0
socialques
Patrick Lewis :
Could you just get the character codes and sum them all?
2023-12-31 05:04:30
0
cerredz5
Cerredz :
Use array of length 26, although hashmap inserts at 0(1) time complexity, there are actually multiple operations to achieve that 0(1) time
2023-12-08 07:22:56
1
edumntg
Eduardo Montilva :
Real question: isn’t dictionaries just maps, not hashmaps?
2023-12-11 01:54:23
0
wallzjon_12
Jon :
👌
2023-12-29 01:23:08
0
greghogg5
Greg Hogg :
I offer 1 on 1 tutoring for Data Structures & Algorithms! Email me at [email protected] - first call is free!
2024-01-04 19:55:48
0
desaintgermain
desaintgermain :
what a strange interview model, do these even require any creativity if you can just memorise all of them?
2023-12-10 00:58:43
0
beeegyoshiii
beeegyoshiii :
bla bla bla such a waste of time
2023-12-08 06:57:43
3
.nullpointerexception
java.lang.NullPointerException :
Python noob
2023-12-08 07:00:51
2
To see more videos from user @greghogg5, please go to the Tikwm homepage.

Other Videos


About