# ByteDance Data Scientist | October 2020

S
swamyApril 5, 2021, 01:12 AM
Upvote
1
Downvote

Company: Bytedance

Position: Data Scientist

Location: nan

Level: Mid-level

Outcome: NA

How was the interview process? What was it like?

`The interview was quite great. All the people that I interviewed were PHD holders. In all the interviews the approach to the question was tested more than getting the correct solution`

What technical questions were asked?

`Python / Pandas, Data Structures and Algorithms, SQL / Analytics, ML Implementation/Engineering System Design, Probability, Modeling and ML Knowledge, Product Metrics and Analytical`

What was one of your solutions?

`First Solution is the brute force approach`
`Loop through all the elements and find the element's index`
`def get_ele_index(arr, target):`
`    out = -1`
`    for i in range(len(arr)):`
`        if arr[i] == target:`
`            out = i`
`    return out`
`For solving it in o(logn) you can use binary search`
`First binary search for finding the pivot`
`Then binary search again for finding the element`
`def find_pivot(arr, low, high):`
`    mid = int((low + high)/2)`
`    if arr[mid] > arr[mid+1]:`
`        return mid+1`
`    else:`
`        if arr[low] > arr[mid]:`
`            find_pivot(arr, low, mid)`
`        else:`
`            find_pivot(arr, mid, high)`
`def binary_Search(arr, ele, low, high):`
`    mid = int((high+low)/2)`
`    print(arr, mid, arr[mid], ele, arr[mid] == ele)`
`    if arr[mid] == ele:`
`        return mid`
`    elif arr[mid] > ele:`
`        mid = binary_Search(arr, ele, low, mid)`
`    else:`
`        mid = binary_Search(arr, ele, mid, high)`
`    return mid`
`def find_element(arr, ele):`
`    pivot_index = find_pivot(arr, 0, len(arr)-1)`
`    print(pivot_index, arr)`
`    if ele < arr[-1]:`
`        return binary_Search(arr, ele, pivot_index, len(arr)-1)`
`    else:`
`        return binary_Search(arr, ele, 0, pivot_index)`

Data Scientist
I
Ichimoku
Top comment
Lorem ipsum dolor sit amet, consectetur adipiscing elit
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
F
Fibonacci
Sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et

quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est
I
Ichimoku
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium 😀
F
Fibonacci
Sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et

quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est
There's so much more to Interview Query! Sign up to access hundreds of interview questions, expert coaching and a flourishing data science community.