#Oa

1 messages · Page 1 of 1 (latest)

tacit perch
#

How was the OA?

sturdy sparrow
#

3 lc (easy + 2 meds maybe?)

tacit perch
#

Oh fr? I heard it was p hard

muted pasture
#

the last one was significantly harder than the second

#

second was a med

tacit perch
muted pasture
#

last one was some array manipulation thing, dunno what the actual solution is

tacit perch
#

🥲

#

Graph question just means simple bfs/dfs right?

muted pasture
#

multi bfs yeah

#

lc med

tacit perch
#

Any similar questions on leetcode I can look at

muted pasture
#

i havent seen any but its just bfs from multiple sources

#

an extra nest level basically

tacit perch
#

Oh ok. Sucks that I need to take the OA within 3 days of when they sent it

muted pasture
#

wait i gotchu for the last one:

yo, nah i did it for python sorry. in case they’re the same questions, the first 2 are standard meds and the last one is kinda fucked. the premise is that you’re given a string of capital letters. you can compress the string by replacing all consecutive matching letters with the count and the letter. For example AAABBBCC would turn into 3A3B2C. an edge case is that if the count is 1, you wouldn’t include it. so AAABCC would just turn into 3AB2C. The task is to find k letters to remove from the original string such that the new version is the shortest when compressed. 

the tricky part is that once you remove letters, the remaining string can have a different compression than before. for example AABAA with k = 1 would have you remove B to get AAAA, which compressed is 4A. Another tricky case is that the number of digits in the count matter since more digits = longer string
#

if this is a med im just stupid but best of luck

tacit perch
#

Yea does look challenging

muted pasture
#

who pinged