# MOST COMMON Dropbox CODING INTERVIEW QUESTIONS

###### The 15 most asked questions in dropbox interview

###### ARRAYS

Determine if the sum of three integers is equal to the given value

__Problem statement__

Given an array of integers and a value, determine if there are any three integers in the array whose sum equals the given value.

###### ${title}

Merge overlapping intervals

__Problem statement__

Given a list of intervals, merge all the overlapping intervals to produce a list that has only mutually exclusive intervals.

###### LINKED LISTS

Add two integers

__Problem statement__

Given the head pointers of two linked lists where each linked list represents an integer number (each node is a digit), add them and return the resulting linked list.

###### ${title}

Merge two sorted linked lists

__Problem statement__

Given two sorted linked lists, merge them so that the resulting linked list is also sorted.

###### TREES

Determine if two binary trees are identical

__Problem statement__

Given the roots of two binary trees, determine if these trees are identical or not. Identical trees have the same layout and data at each node.

###### ${title}

Mirror binary tree nodes

__Problem statement__

Given the root node of a binary tree, swap the ‘left’ and ‘right’ children for each node.

###### STRINGS

Find all palindrome substrings

__Problem statement__

Given a string find all non-single letter substrings that are palindromes.

###### ${title}

Reverse words in a sentence

__Problem statement__

Reverse the order of words in a given sentence (an array of characters).

###### DYNAMIC PROGRAMMING

Find the maximum sum of a subarray

__Problem statement__

Given an array of positive numbers and a positive number ‘k’, find the maximum sum of any contiguous subarray of size ‘k’.

###### MATH AND STATS

Power of a number

__Problem statement__

Given a double, ‘x’, and an integer, ‘n’, write a function to calculate ‘x’ raised to the power ‘n’.

###### BACKTRACKING

Find all sum combinations

__Problem statement__

Given a positive integer, target, print all possible combinations of positive integers that sum up to the target number.

###### GRAPHS

Clone a directed graph

__Problem statement__

Given the root node of a directed graph, clone this graph by creating its deep copy so that the cloned graph has the same vertices and edges as the original graph.

###### DESIGN

Implement a LRU cache

__Problem statement__

Least Recently Used (LRU) is a common caching strategy. It defines the policy to evict elements from the cache to make room for new elements when the cache is full, meaning it discards the least recently used items first.

###### SORTING AND SEARCHING

Search in rotated array

__Problem statement__

Search for a given number in a sorted array that has been rotated by some arbitrary number. Return -1 if the number does not exist. Assume that the array does not contain duplicates.

###### ${title}

Merge overlapping intervals

__Problem statement__

Given a list of intervals, merge all the overlapping intervals to produce a list that has only mutually exclusive intervals.