TORONTO KIDS COMPUTER CLUB | Markham Saturday 14:00 Java Homework 21.06.19.
19646
post-template-default,single,single-post,postid-19646,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Markham Saturday 14:00 Java Homework 21.06.19.

24 Jun Markham Saturday 14:00 Java Homework 21.06.19.

Question:
Given an array of strings as below:

strArr = [“apple”,”banana”,”or”,”and”, “they”,”them”,”fighter”]

Use any sorting algorithm to sort the array according to the size of the string.  If the array contains multiple strings with the same length, you can order those strings in any order.

Final Sorted array should be as below

strArr = [“or”,”and”,”they”,”them”, “apple”,”banana”,”fighter”]

No Comments

Sorry, the comment form is closed at this time.