• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

Can we use the modulus operator in HSC algorithm questions? (1 Viewer)

lincolny

Member
Joined
Jul 8, 2021
Messages
32
Gender
Male
HSC
2021
Hey there,

I know it's a bit late, but can we use the modulus operator in HSC algorithm questions?

A modulus operator, "%" can be used to calculate the remainder of a division operation:

10%6 = 4 as 10/6 = 1 .... 4 has remainder 4.

And also, can we just say that "array starts from 1 or 0" in a specific question?

Let me know what you think about those... Our teacher didn't mention whether we can or can not.

Cheers,
Lincoln
 
Last edited:

Drdusk

Moderator
Moderator
Joined
Feb 24, 2017
Messages
2,022
Location
a VM
Gender
Male
HSC
2018
Uni Grad
2023
Hey there,

I know it's a bit late, but can we use the modulus operator in HSC algorithm questions?

A modulus operator, "%" can be used to calculate the remainder of a division operation:

10%6 = 4 as 10/6 = 1 .... 4 has remainder 4.

And also, can we just say that "array starts from 1 or 0" in a specific question?

Let me know what you think about those... Our teacher didn't mention whether we can or can not.

Cheers,
Lincoln
Yes you can do both of those things. However don’t write the array one if the question tells you what index it starts at.

As said above write mod. Although I don’t think I’ve ever seen an algorithm question in the history of the HSC where you had to use modulo.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top