[SOLVED] WT-Assignment 2
20.99 $
Programming resource
✓
Practical programming resource
✓
Suitable for guided study and reference
✓
Tutor guidance available when needed
Description
- Write a java program to compare two strings lexicographically (without using library function).
- Write a program to implement counting sort (with input in the range 0 to 20 and input can be repeated multiple times)
- Write a program to sort strings (without using library function).
- Find the smallest n such that Σi = i2 where 1 ≤ i ≤ n is too large to be represented as an int.
- Let us define a couple of sets of integers, and let Java compute the set-theoretical operations (union, intersection and complement). We first fix our universe, which will consist of the 11 elements, Universe = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, A and B will be entered by users.
- Only array can be used as data structure
- Using any efficient data-structure available in Java
- Compare the time to compute the operations
- Write a ConsoleProgram that reads in a number from the user and then displays the Hailstone sequence for that number (Pick some positive integer and call it n. If n is even, divide it by two. If n is odd, multiply it by three and add one. Continue this process until n is equal to one)
Resource details
Understand the Task Before You Use the Resource
Review the requirements, identify the programming concepts
involved, study the implementation and test your understanding
with your own examples and modifications.