Logout

4.2.7

Suggest suitable algorithms to solve a specific problem.

 

Teaching Note:

Suitable algorithms may include both standard algorithms and novel algorithms. Suitable may include considerations of efficiency, correctness, reliability and flexibility. Students are expected to suggest algorithms that will actually solve the problem successfully.

LINK General principles of computational thinking, introduction to programming.


 

Sample Question:

sdfsdfsf

JSR Notes:

Here are some points about the Teaching Note considerations:


considerations of efficiency
- This is the main thing you can expect to deal with in terms of "suitability". Recall Big O, and you can even use it, but you can't assume the marker is familiar with it, so explain what you mean by any Big Os you mention.

 350     notes  Intro to Efficiency of Algorithms and "Big O"


correctness
- the algorithm you suggest has to fit the situation. So, for example, you could not suggest using a binary search unless you include sorting the array first. Or should you use a while or a for loop for a given situation (while only when the number of iterations is uncertain, and for when the number of iterations is certain/fixed).


reliability
- this would come into play if an algorithm is suggested which has an inherent weakness it it. And if you are making your own algorithm, the biggest thing here is to remember common exceptions or cases. The biggest example here in algorithms you would use or make is to check empty and full data structures, so using "isFull()" and "isEmpty()" methods when adding to and accessing from data structures.

flexibility - the ability to work with different data types is the biggest thing here. For example, our sort and search algorithms are often type specific, and so we have to make different overloaded versions of them (which is Ok).