Computer Science, asked by Anonymous, 10 months ago

How to write algorithm of a java program?

Answers

Answered by Itzraisingstar
8

Answer:

Explanation:

An algorithm is unambiguous finite step-by-step procedure which is given input to produce output. ... We can implement algorithms in Java. Algorithms are mathematical, we can implement an algorithm using a programming language to solve a problem on a computer.

Answered by Thehelper16290
1

The java collection framework provides various algorithm that can be used to manipulate elements stored in data structures. Algorithm in Java are statics method that can be used to perform various operation on collection .

Sorting using sort

The sort method provides by the collection of framework is used to sort elements .

2. Shuffling using shuffle

The shuffling method of Java collection framework is used to destroy any kind of order present in the data structure

3. Route Data Manipulation

In Java the collection of framework provides different method that can be used to manipulate data

4.searching using binary search

The binary method of Java collection of framework searches for the specified elements .It Return the position of the elements in specified collection.

5. Composition

  • Frequency - return the count of numbers of time an element present in the collection
  • Disjoint - cheaks if two collection contain some common element

6. Finding extreme values

The min and max method of the Java collection framework are used to find the minimum and the maximum elements respectively.

Hope it helps you out

Similar questions