Question: E . g . : If we have the 3 symbols below, and their respective uses: used 5 times. used 2 times. used 9 times.
Eg: If we have the symbols below, and their respective uses:
used times.
used times.
used times.
Given that they add to a total use of their frequencies will be:
A static method called "sortSymbols
Takes in a Symbol array as input and returns no output.
It sorts the symbols by descending frequency ie: the symbol with the highest frequency must be in the th index and the symbol with the lowest frequency must be in the last index
In the previous eximple, the symbols would have been sorted as such:
If two symbols have the same frequency, they must be sorted by ascending codepoint value ie: a symbol with a lower codepoint value must come before a symbol with a higher codepoint value
See the table below to determine the ordering of the symbols we'll be using. The table is already sorted in ascending order by its codepoints.
You may not use any builtin sorting methods or libraries. You must write the sorting algorithm yourself.
You can find the Bubble Sort algorithm in the slides for L under Module part
The main method.
Creates an array of Symbols called "symbols" of size and fills it up with Symbol objects using their overloaded constructor, with each Symbol object using one of the characters in the order they appear below:
tableSymbolCodepointluEluAlulululud
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
