Hi, I need JavaScript code and corresponding HTML code to do
Hi, I need JavaScript code and corresponding HTML code to do the following:If you look at some compression techniques (such as LZW Compression https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch )they make use of the concept of hashing techniques to compress files.We are going to do something similar. Consider the phraseTo be or not to be, that is the question.Even though it does not make much sense to do this as the phrase isshort. We are going to create bins for each word, and record theposition of the instances of the words in the proper bins. So write aprogram that first has a series of binstobeornotBecause the word to occurs in positions 1 and 5, the bin for the word to will contain 1 and 5to: 1, 5be: 2, 6or: 3not: 4Write an program that will take the phrase, create bins for eachword, and then record the instance position of each word in the bin. Itwill then output each bin (word) and the locations of the word in thephrase. So if the input was;I want what I want and I know what I want.The output would be;I: 1, 4, 7, 10what: 3, 9want: 2, 5, 11and: 6know: 8I have included the base shell code to use (see attached word document). Use this code and expand to make sure it functions per instructions.You will be able to use the String split function to separate the inputinto the initial array and I will only use spaces to separate words whentesting your code. You can use an array, Lists, or Queues or combinations of these to holdthe information. For example you could keep the bins in an array andeach bin could be a list.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
