Linkedin Interview Report
- 0of 0 votes
AnswersFind unique integers from list of integers
# Question # Write a function that will return an array of integers that occur exactly once in a given array of integers. # e.g. For a list [1,2,3,5,2,2,3,4], return [1,5,4] since they appear once (order does not matter). def once_integers(integers):
Follow up:
Optimize the code if input is sorted.
- Saurabh October 03, 2016 in United States for Software Developement - Tools# What if the input is sorted, such as [1,2,2,2,3,3,4,5], could the algorithm be further optimized # (e.g. space complexity)? def once_integers_sorted(integers):
| Report Duplicate | Flag | PURGE
Linkedin Software Developer - 0of 0 votes
AnswersString Rotation. Given two string check if String1 is rotating match for String2
- Saurabh October 03, 2016 in United States for Software Developement - Tools# Given two strings. Write a function that will return true if one string is a rotation of the other string. # e.g. 'bca' and 'cab' are rotations of 'abc' and the function should return true # 'barbazfoo', 'oobarbazf' and 'rbazfooba' are rotations of 'foobarbaz' def is_rotation(string1, string2):
| Report Duplicate | Flag | PURGE
Linkedin Software Developer Algorithm