Question: Task 1: Construct the unsorted sequence of words. Select a long quote from one of your favorite books. Keep only the first 48 characters. Replace

  • Task 1: Construct the unsorted sequence of words.
    • Select a long quote from one of your favorite books. Keep only the first 48 characters.
    • Replace the letters as follow: f -> a (f with  a), g -> b, h->c, i->d , j->e, k->a, l->b, m->c, n->d, o->e, p->a, q->b, r->c, s->d, t->e, u->a, v->b, w->c, x->d, y->e, z->a. Change the text all in lower case letters
    • Select words of 4  letters, one after another. You will have 12 words.
  • In the following tasks we will apply LSD to sort the twelve(12) words using key-index string sort at each step.
  • Task 2: Start with the first index (specify which is the first that you need to consider)
    • Compute the initial start index array for the words and considered key
  • Task 3: Compute the order of the words for the first key
  • Task 4: Compute the initial start index for the second key
  • Task 5: Compute the new order of the  words for the second key
  • Task 6: Compute the initial start index for the third key
  • Task 7: Compute the new order of the  words for the third key
  • Task 8: Compute the initial start index for the third key. Compute the new order of the words for the key.
    Write the code for the above tasks.

Step by Step Solution

3.35 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is the code for the above tasks Python def constructunsortedsequencequote Constructs the unsorted sequence of words from the given quote Replace the letters in the quote as specified quote quotel... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!