ByteDance Interview Question

Asked lots of questions on CS concepts... UDP vs TCP http vs https DynamoDB partition How TreeMap in Java is implemented SQL indexes Coding: Add operation in LinkedList. For example: 1->2->3 + 2->4 => 1->6->7

Interview Answers

Anonymous

Jul 28, 2019

Add operation in LinkedList. For example: 1->2->3 + 2->4 => 1->6->7 Obviously we cannot convert it to integer as it might overflow. Mentioned we can convert the LinkedList to a string, add them together, convert it back to linkedlist but obviously we can optimized to O(1) space from O(n) space. Wrote the code to reverse the linkedlist and add them together, reverse the linkedlist result and return it

1

Anonymous

Aug 5, 2020

Wow this is easy-medium of leetcode.