#Oa
1 messages · Page 1 of 1 (latest)
3 lc (easy + 2 meds maybe?)
Oh fr? I heard it was p hard
Yea a graph question right?
nah graph question was second question
last one was some array manipulation thing, dunno what the actual solution is
Any similar questions on leetcode I can look at
i havent seen any but its just bfs from multiple sources
an extra nest level basically
Oh ok. Sucks that I need to take the OA within 3 days of when they sent it
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
Yea does look challenging
who pinged