#process tiktok oa done absolutely

1 messages · Page 1 of 1 (latest)

livid wadi
#

bytedance fuked me up too

#

felt like 2 LC hards

primal shuttle
#

i tried to solve.. they were bound by hard time constraints. idk how the hell i need to improve time complexity. 😭

plucky trail
#

how was sql?

primal shuttle
old gorge
#

tiktok oa is insane

#

def lc hard

naive cairn
#

@primal shuttle Could you share the questions? :p

plucky marlin
#

+1

primal shuttle
#
  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.

  2. 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

swift sinew
#

what about the Database question ?

cunning jewel
primal shuttle
#

actually no

#

nightmares solving it in time constraint

livid wadi
#

@primal shuttle yea thats what i had as well, did you solve either?

swift sinew
#

what was the database question?

primal shuttle
cunning jewel
#

tiktok OA is so hard we dont even understand the questions, much less solve them

swift sinew
#

I found. Ramp codesignal exam the toughest of all I had written

#

did anyone get 600/600?

primal shuttle
#

@livid wadi did you?

livid wadi
#

i solved one, got 10/15 on the xor one

cunning jewel
#

im grinding DP hard and i'm sure i'm still gon fail

livid wadi
#

even if i dont full solve is it possible to move on?

primal shuttle
limber barn
red mango
#

It can be solved by O(n) use sliding window concept

strong sentinel
#

i got 600/600 on ramp but couldnt solve a single q on tiktok OA

shell cargo
#

@primal shuttle what about the multiple choice what questions u got?

inland bison
#

did u use gear 5?

smoky bison
#

DM me for Tiktok OA questions, Q4 and Q5

limber barn
swift sinew
#

They're hugeeeeee

smoky bison
strong sentinel
#

i took 55

#

i did it in python

smoky bison
#

those Step 4 edge cases brutalized me

strong sentinel
#

right?!

smoky bison
#

4 test cases remained, and I got a reject : (

strong sentinel
#

i mean i got 600/600 and got reject

livid wadi
strong sentinel
#

yea lol

#

ramp's oa is meant for senior engineers

livid wadi
#

das crazy

shell cargo
shell cargo
#

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.

cunning jewel
#

this OA already done right?

#

like it's expired as of 1h30m ago?

sullen crypt
#

did you guys understand the first mc?

#

i had no idea what it was asking, the question made no sense

#

The resource allocation one

livid wadi
sullen crypt
#

@livid wadi did u do the oa? Can I dm

shell cargo
sullen crypt
#

@indigo holly

red mango
#

U woud have got that right if u used bankers algorithm to solve

swift sinew
#

I got 13/15 for the xor question 🥲

#

Idk where I was going wromg

sullen crypt
red mango
sullen crypt
#

just wasnt sure what it was asking, it said each resource had 5 instances but in the chart some of them had 6

red mango
#

I ran the algorithm and i got a sequence so i chosed safe state

red mango
sullen crypt
red mango
#

tiktok oa was weird though
literally 120 mins was too less for those questions

high mulch
#

i guessed on the MC, and skipped the SQL and still moved on 👀

swift sinew
red mango
#

Oh thats weird then

plucky trail
shell cargo
high mulch
#

camera

high mulch
sullen crypt
#

product

swift sinew
strong sentinel
#

no

#

they wanted

#

10^9 + 7

shell cargo
#

Yeah one of those I don’t remember the exact number😅

swift sinew
#

I remember it being (1e9+7)

livid wadi
#

1e9+7 is the standard, it’s the largest prime number that fits in an int

strong sentinel
#

fuck im a moron

#

i meant mod 10^9 + 7 😭

cunning jewel
#

reject after successful SQL and both O(n) PepeHands

strong sentinel
#

how is ur resume 😭 @cunning jewel

cunning jewel
#

probably bad

strong sentinel
#

wdym "probably bad"

#

like whats ur experience

#

@cunning jewel

molten elm
primal shuttle
molten elm
#

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?

swift sinew
#

I got 13/15

cunning jewel
#

basically there were two realizations

#
  1. "xor of first and last = xor of inner" is the same as total xor = 0
#
  1. 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

swift sinew
#

Yeah I did the exact same thing