#process tiktok oa done absolutely
1 messages · Page 1 of 1 (latest)
i tried to solve.. they were bound by hard time constraints. idk how the hell i need to improve time complexity. ðŸ˜
how was sql?
with the knowledge i have i couldnt do it actually. or i was so frustrated because i couldnt solve coding.
@primal shuttle Could you share the questions? :p
+1
-
minimum common integer between all the subarrays of length 1 to n.
return list of n integers, where index of list is the size of subarray. i.e., if i = 0 then subarrays are of size 1. -
some channel rating - in all subarrays of length 3 to n. count number of subarrays with equal border element [0, -1] xor and remaining elements xor
what about the Database question ?
yo, this is it. i had nightmares solving it
actually no
nightmares solving it in time constraint
@primal shuttle yea thats what i had as well, did you solve either?
what was the database question?
please dont ask 
its kinda hard to explain without tables. idk
tiktok OA is so hard we dont even understand the questions, much less solve them
I found. Ramp codesignal exam the toughest of all I had written
did anyone get 600/600?
but people still managing to full solve tiktok oa. idk whats wrong with me
@livid wadi did you?
i solved one, got 10/15 on the xor one
im grinding DP hard and i'm sure i'm still gon fail
even if i dont full solve is it possible to move on?
idk.. i thought we couldnt and i gave up. lol
what logic did you use ? I have one which runs in n^3, looking for a better approach
It can be solved by O(n) use sliding window concept
ramp was easy compared to tiktok lol
i got 600/600 on ramp but couldnt solve a single q on tiktok OA
@primal shuttle what about the multiple choice what questions u got?
did u use gear 5?
DM me for Tiktok OA questions, Q4 and Q5
Can i DM you ?
wtf how? which language ? Your probably the fastest coder I know
They're hugeeeeee
600 on ramp is impressive
not rly. ik people who did it in 35 mins
i took 55
i did it in python
those Step 4 edge cases brutalized me
right?!
4 test cases remained, and I got a reject : (
i mean i got 600/600 and got reject
is it harder than GCA?
das crazy
no thats not correct because for the oa it was not distinct integers
Although I ran out of time on my attempt the optimal solution would be to calculate the min start of window partaining to number and max end of window and calculate how many windows of size k u can fit inside also because of duplicates your start for duplicated number within k elements would be the caharacter after prev duplicate. Find the min number with n-k+1 numbers in your calculations. That is mink for that k elements. Giving u an overall complexity of (n^2) most optimal I can think of.
did you guys understand the first mc?
i had no idea what it was asking, the question made no sense
The resource allocation one
its also doable in O(n). for each element, you keep track of all the indices and find the largest gap between the elements and the end points (0 and n). the largest gap will represent the minimum subarray size that cannot contain the elements, and we can easily update the answer array from there
@livid wadi did u do the oa? Can I dm
Find largest and then use largest to calculate possible subarray patterns yeah sounds solid.
@indigo holly
Hi
The first one was bankers algorithm
U woud have got that right if u used bankers algorithm to solve
was it a deadlock?
No we get safe state
just wasnt sure what it was asking, it said each resource had 5 instances but in the chart some of them had 6
I ran the algorithm and i got a sequence so i chosed safe state
Was it because of TLE or wrong ans?
Did u use mod operator
maybe that's right but the question itself didnt make sense to me lol
tiktok oa was weird though
literally 120 mins was too less for those questions
i guessed on the MC, and skipped the SQL and still moved on 👀
No. I wrote O(n) solution. So it’s not tle. I used mod every where possible.
Oh thats weird then
how did you do this? that question made no sense since some of the resources were overallocated.
oh if i reember u had to modulo 10^7
What team?
camera
Wbu?
product
what? not 10^7+9 ?
Yeah one of those I don’t remember the exact number😅
I remember it being (1e9+7)
1e9+7 is the standard, it’s the largest prime number that fits in an int
reject after successful SQL and both O(n) 
how is ur resume 😠@cunning jewel
probably bad
Lmao I got the same questions, I answered the first 3 well but these dp questions were mad shit hard. Couldn't do better than 6/15 for both questions.
i could 10/15 for the 1st. and then i completely gave up cuz only 5/5 moves forward. probably that was my mistake to give up 💀
solving them in n^3 was kinda straightforward so I wrote it first within 10 mins just incase the time fucks me up, and it actually did lmao.
when do we hear back about rejection tho? any idea how long it takes?
how did you solve the xor question?
I got 13/15
you may have forgot to modulo
basically there were two realizations
- "xor of first and last = xor of inner" is the same as total xor = 0
- because xor is its own complement you can check if there's any values equal to current running value so far
like, if the running xor of [0:i] is 2, and the running xor of [0:j] is 2, then the xor of [i:j] is 0
you dont even need to prefix sum you can just count values so far in a hashmap
Yeah I did the exact same thing