Question


Problem 6. (20 points) Texting. You are competing with your friends to type text messages on your smartphone as quickly as po

the pseudocode or precise description in words of the algorithm

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The characters to be typed are C1C2....Cn

Initialize a=7,b=9

for(i to n) //C1C2....Cn
      if(i is odd) //To move left thumb
             temp=dist(a,Ci)
             a=Ci
      endIf
      if(i is even) //To move right thumb
            temp=dist(b,Ci)
            b=Ci
      endIf
      Total time+=temp
endFor

Add a comment
Know the answer?
Add Answer to:
Problem 6. (20 points) Texting. You are competing with your friends to type text messages on your...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • the wheel. The top part of the wheel is moving away from you and the bottom...

    the wheel. The top part of the wheel is moving away from you and the bottom is moving toward you a 2 You are walking holding on to the axle of a spinmin bicycle wheel with one hand on either side of 7) start to turn left, you feel the right side of the axde and the axle is horizontal. As you A) Pull on your right hand away from you B) push on your right hand toward the left....

  • :) Problem: ??? Your task: implement in CH the algorithm solution shown below. Then analyze it...

    :) Problem: ??? Your task: implement in CH the algorithm solution shown below. Then analyze it and explain, using just one or two sentences, what it does. Write this explanation as a comment at the top of your program. This explanation will be worth 5 points of your total grade. Do not be too detailed (for example, do not write it opens a file and then declares variables, and then reads from a file...), it should look like the problem...

  • (20 points) Suppose you are given a binary search tree T of n nodes (as discussed...

    (20 points) Suppose you are given a binary search tree T of n nodes (as discussed in class. each node v has v.left, v.right, and v.key). We assume that no two keys in T are equal. Given a value x, the rank operation rank() is to return the rank of x in T, which is defined to be one plus the number of keys of T smaller than 2. For example, if T has 3 keys smaller than r, then...

  • You are given a binary tree of the form: Each node in the tree has a...

    You are given a binary tree of the form: Each node in the tree has a left child and a right child. Each of the children will be extended as a linked list. Every node has the following attributes: key, left node, right node, and next node. The next node allows a node, that is a part of the tree, to be extended as a linked list. The diamonds represent the next nodes, which are part of the linked list...

  • Please program this in Visual Basic 6. You have chosen to create an electronic version of the sliding tile puzzle game....

    Please program this in Visual Basic 6. You have chosen to create an electronic version of the sliding tile puzzle game. The object of the game is to slide the tiles so that they end up in the required order. The images shown below are examples of the two different versions of this puzzle (numeric and graphical) Puzzle Board-Numeric Puzzle Board-Graphical File Options Help Elapsed Time File Options Help Elapsed Time 00:02:12 00:04:20 5 6 7 8 9 10 11...

  • using java to write,show me the output. please write some common. You CAN NOT use inbuild...

    using java to write,show me the output. please write some common. You CAN NOT use inbuild functions for Tree ADT operations. using code below to finsih public class Main {    public static void main(String[] args) {        BinaryTree tree = new BinaryTree(); tree.root = new Node(1); tree.root.left = new Node(2); tree.root.right = new Node(3); tree.root.left.left = new Node(4); tree.root.left.right = new Node(5); tree.root.right.left = new Node(6); tree.root.right.right = new Node(7); tree.root.left.left.left = new Node(8); tree.root.left.left .right= new Node(9);...

  • . Long on to a PC with the administrator account, or an account that has administrator privilege....

    . Long on to a PC with the administrator account, or an account that has administrator privilege. Please take a note of your system information and location where you perform the lab. Open the command prompt. For Windows 10, type cmd in Cortona. For Windows XP. choose Start à Run, and type cmd in the Open field. For Windows 7, click on Start, enter cmd in "Search program and file, and choose "cmd.exe from search result. For Windows 8 press...

  • # No plagiarism #Decide on the type of motherboard to use in the computer system you...

    # No plagiarism #Decide on the type of motherboard to use in the computer system you are designing. Explain what it is and why you chose it. This from Lab 5.1 Using the information you recorded previously in Step 5, consult Table 5-1 to find out how to enter your system’s setup utility. (Alternatively, when you first turn on your PC, look for a message on your screen, which might read something like “Press F2 to access setup.” Table 5-1:...

  • C PROGRAMMING You must write a C program to check the validity of a Sudoku solution. Follow the link to know more about...

    C PROGRAMMING You must write a C program to check the validity of a Sudoku solution. Follow the link to know more about Sudoku: https://www.bigfishgames.com/blog/how-to-solve-sudoku-puzzles-quickly-andreliably/ You must at least do the following: 1- Ask the user to provide a minimum of first two rows of the Sudoku grid. For the rest of the entries, you should use random number generator. 2- Use appropriate logic to make sure random number generator generates distinct set of valid integers! 3- It should be...

  • If the focus in a form moves from left to right and you want the focus...

    If the focus in a form moves from left to right and you want the focus to move from top to bottom, change the _____. . a. . sort order . b. . tab order . c. . form layout . d. . focus grouping    What do you change when you drag the right border of a form in Form Design view? . a. . the layout of the form . b. . the width of the form ....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT