Java programming

Some people remain old fashioned and John is one of them. He doesn’t like the new smart phones with full keypads and still uses the old keypads which require you to tap a key multiple times to type a single letter. For example, if the keyboard has two keys, one with the letters “adef” and the other one with the letters “zyx”, then typing ‘a’ requires one keystroke, typing ‘f’ requires four keystrokes, typing ‘y’ requires two keystrokes, and so on.

He recently moved to a new country where the language is such that his keypad is not the most efficient. In every language some characters occur more often than others. He wants to create a specific keyboard for this language that uses N different letters. He has a large body of text in this language, and has already analyzed it to find the frequencies of all N letters of its alphabet.

You are given an array ‘frequencies’ with N elements. Each element of frequencies is the number of times one of the letters in the new language appears in the text John has. Each element of frequencies will be strictly positive. (I.e., each of the N letters occurs at least once.)

You are also given an array keySize. The number of elements of keySize is the number of keys on the keyboard. Each element of keySize gives the maximal number of letters that maybe put on one of the keys.

Sample Solution

positioned as housewives whose concerns do not extend beyond the narrow frame of their household “I would cautiously and silently get up take the dust off my husband’s feet without waking him.” (Tagore 18). This effectively removes each woman from matters of the outside world and suggests that there is a sense of privacy and security attached to the domestic household. In doing so, a distinct divide is created between the outside and inside spaces in both texts. This can be seen explicitly in Ibsen’s choice of setting for A Doll’s House, “A comfortably and tastefully, though not expensively, furnished room.” (109), which is clear in its exclusive focus on the middle-class, bourgeoise household. This claustrophobic setting is overt in its marked isolation. It is, at first glance, untouched by the influence of the outside world. However, a close reading of the “tastefully, though not expensively, furnished room.” (109) reveals an unmistakeable consciousness surrounding financial matters. In other words, the pressures of capitalism can already be spotted within the household. In this light, the room’s interiors appear to be a calculated facade imitating comfort yet bearing marks of concern towards matters of wealth and appearance. Mark Sanberg expands upon this idea of innate corruption within the bourgeoise household by stating that Ibsen’s text is concerned with “dislodging the home from its privileged association with domestic ideals and the testing of the “house” as a modern alternative.” (85). Indeed, the distinction between the home and the house is an im

This question has been answered.

Get Answer
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, Welcome to Compliant Papers.