{6,12,4,7,9}


How do i write a method name serachMax that receives the list above (as an array of integer) as it's argument and return the largest value in the list

and

How do i create a method name countitem that receives that list above (as a referenced based linked list of integers) as it's argument and returns the largest value in the list

Recommended Answers

All 4 Replies

Why not post your attempt ? Read this.

Member Avatar for iamthwee

Hint: Search for bubble sort.

Once you've successfully done that, then you can start to think about creating a function or method for it.

you already wrote that method name in your question, thereby answering your own question.

{6,12,4,7,9}
How do i write a method name serachMax that receives the list above (as an array of integer) as it's argument and return the largest value in the list

Hint: for loop

How do i create a method name countitem that receives that list above (as a referenced based linked list of integers) as it's argument and returns the largest value in the list

Hint: while loop

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.