Friday, March 1, 2019

Java Exercises #1

Exercise 1-1
  1. Write a program that take inputs from command line and create a todo list.
  2. Take names from command line and create a list. Print out the sorted list.
  3. Take a list of numbers from input and search if a certain number is there.
     Try different ways and analyze run time.
  4. Take two n digit numbers and use an algorithm better than brute-force to multiply.
  5. Implement Karatsuba algorithm for integer multiplication
Exercise 1-2
  1. Build a binary tree
  2. Take "car" and return how many possible way to convert it to "let", one letter at a time.
Exercise 1-3
Take a list of students name and their score. Print the top 5 scores and their names.
Exercise 1-4
Take a list of pairs of numbers, which indicate pairs of nodes that is connected. Provide two functions:
1. Output the connected clusters.
2. Return true or false if two nodes are connected.

No comments:

Post a Comment