#.

1 messages · Page 1 of 1 (latest)

lunar jackal
crystal isle
#

like lru cache?

elder fiber
#

tagged?

covert cedar
#

Was it design task manager?

crystal isle
#

they make u walk through a test case?

scenic lagoon
#

i would not have used a trie 💀

#

question is dumb asf

supple hinge
#

nah its not trie

#

is it not just a basic freq counter

#

and break early if freq of a certain character exceeds

#

like arr of size 26 then map each char to idx assuming all lowercase

#

then same thing for each word in list

autumn beacon
#

damn that's so foul

#

im cooked

supple hinge
#

yeah i mean you have to do that regardless no

#

if thats what u did should be fine

#

ya just verifeid with gpt too

#

how can you not iterate through each word

#

lol

#

even if u build a tire

#

u need to

#

wait wdym

#

you only iterate once

covert cedar
#

how, isnt it going to be 26^n

supple hinge
#

you build the freq counter with the given letters

#

and then iterate thorugh each word in the list once

#

keep track of longest

#

bro

#

yes

#

thats o(1)

#

for each

#

O(26)

#

bro

#

what do u want lol

#

O(1) total TC?

#

lmfoa

#

you cant get better than O(n * M)

#

ya ur interviwe dumnb

#

maybe they just wanted anotehr veriosn

#

but if they explicty said tis more optimal they need to hop back on the LC grind

#

cuz they dunno what they talkg ibatbotu

#

ya sometiems they want something else eevn if what u have is optimal

#

juist depends

#

if preporessing doesnt count towards TC/SC then yea ur right i think

#

TC sohuld be same for both apporaches but trie is more memory

#

oh muiltiple queires

#

like multiple lists?

#

oh so youre given like multiple potentail characters?

#

then that makes more sense

#

for trie

#

ya then trie makes sense

#

ok ya i thought it was just the thing on stacak overflow

#

nvm then

analog apex
#

i had 15 mins left

#

how many rounds are there

#

2 more techs then EM?

edgy umbra
#

some ppl got 2 qs, other got 1

#

i just got 1 q

covert cedar
edgy umbra
#

dk yet

#

had interview just now