Facebook Interview Report
- 2of 2 votes
AnswersInput: A string equation that contains numbers, '+' and '*'
- huji February 23, 2015 in Israel
Output: Result as int.
For example:
Input: 3*5+8 (as String)
Output: 23 (as int)| Report Duplicate | Flag | PURGE
Facebook Software Engineer - 1of 1 vote
AnswersGiven a class Range
class Range { public int begin; public int end; public Range(int begin, int end) { this.begin = begin; this.end = end; } }
The problem:
- huji February 23, 2015 in Israel
Intput:
1) list of Ranges that don't overlap (not sorted)
2) newRange that might overlap.
Output:
list of merged Ranges
For example:
Input: [1..5] [9..13] [17..22]
newRange: [4..10]
Output: [1..13] [17..22]| Report Duplicate | Flag | PURGE
Facebook Software Engineer
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.