manish.89july
BAN USER- 0of 0 votes
AnswersGiven an integer array with sequence of numbers, come up with a way to compress the data without losing the information. Based on the compressed data, it should be possible to construct the original integer array.
- manish.89july in India
Please reply on manish.89july@gmail.com| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Coding - 0of 0 votes
AnswersFind the number of sequences in an integer array. A sequence is a list of numbers(more than one number) that comes in strict numerical order like [3, 4, 5, 6].
- manish.89july in India
Please reply on manish.89july@gmail.com| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Coding
Write two functions:
First function takes in an array and returns the compressed data in any format.
Second function takes in the compressed data and returns the array in original format.
Sample Input : [1, 3, 4, 5, 8, 9, 11, 13, 14, 15, 16, 20, 23, 30,31,32]
Sample Output: [13, 14, 15, 16]
Sample Input : [1, 3, 4, 5, 8, 9, 11, 13, 14, 15, 16, 20, 23, 30,31,32]
Sample Linked List : [1] -> [3,4,5] -> [8,9] -> [11] -> [13,14,15,16]->[20]->[23]->[30,31,32]
Sample Input : [1, 3, 4, 5, 8, 9, 11, 13, 14, 15, 16, 20, 23, 30,31,32]
Sample Linked List : [1] -> [3,4,5] -> [8,9] -> [11] -> [13,14,15,16]->[20]->[23]->[30,31,32]
It will be appreciated If you can provide me the solution in java
- manish.89july November 15, 2012yes , you are right Mr. Andi, please help me with an optimal code in java without using any library method
- manish.89july November 15, 2012@ vjgvnd91 .......Java
- manish.89july November 15, 2012
RepOffers ammunition for sale form top brands
Sample Input : [1, 3, 4, 5, 8, 9, 11, 13, 14, 15, 20, 23, 30,31,32,33]
- manish.89july November 15, 2012Sample Output: 4 sequences