Expedia Interview Report
- 1of 1 vote
AnswersWe define a k-subsequence of an array as follows
- sonesh April 18, 2017 in United States
1) it is a subsequence of consecutive elements in the array
2) the sum of the subsequence's elements s, is evenly devisible by k(i.e. s % k == 0)
Given an integer and input array, find out the number of k-subsequences.
Example: k=3 and array be [1 2 3 4 1]
Output: 4 ({1 2},{1,2,3},{2,3,4},{3})| Report Duplicate | Flag | PURGE
Expedia Software Engineer / Developer Algorithm - 0of 0 votes
AnswersYou are given an array with duplicates. You have to sort the array with decreasing frequency of elements. If two elements have the same frequency, sort them by their actual value in increasing order.
- sonesh April 18, 2017 in United States
Ex: [2 3 5 3 7 9 5 3 7]
Output: [3 3 3 5 5 7 7 2 9]| Report Duplicate | Flag | PURGE
Expedia Software Engineer / Developer Sorting - 0of 0 votes
AnswersYou are given an integer, print its 4th least significant bit
- sonesh April 18, 2017 in United States| Report Duplicate | Flag | PURGE
Expedia Software Engineer / Developer Bit Manipulation - 0of 0 votes
AnswersYou are given two string (like two statements). You have to remove all the words of second string from first string and print the remaining first string. Please maintain the order of the remaining words from the first string. You will be only removing the first word, not all occurrence of a word.
- sonesh April 18, 2017 in United States
Example: Str1 = "A Statement is a Statement", Str2 = "Statement a"
Output: "A is Statement"| Report Duplicate | Flag | PURGE
Expedia Software Engineer / Developer String Manipulation