Login

Welcome, Guest. Please login or register.

April 16, 2024, 09:54:03 pm

Author Topic: SDD Algorithm Contest (ALCON) | Problem 1: IKEO  (Read 3429 times)  Share 

0 Members and 1 Guest are viewing this topic.

JTrudeau

  • Trendsetter
  • **
  • Posts: 109
  • Master of the Meeses
  • Respect: +90
SDD Algorithm Contest (ALCON) | Problem 1: IKEO
« on: April 15, 2018, 06:52:30 pm »
+9
ALCON WEEK 1

Welcome to the grand opening of the Software Design and Development Algorithm Contest (Alcon for short)!

Please make sure you've read the rules here.

HERE IS YOUR QUESTION:

The furniture store IKEO is looking to find out their most popular rolls of fabric. There are three main types of fabric: plain, striped, and dotted.

Write a program to achieve the following:
  • The name of the type of fabric sold is entered as input into the program. This can be “plain”, “striped”, or “dotted”
  • This process continues until the employee enters "done"
  • The program then outputs the most popular type, and how many of those were entered. -- e.g. if four “plain”s were entered, the program would return “4 plain”.

Optional challenge add on (+2 marks)
(note: this is worth an extra 2 marks for those who would like to attempt it.)

  • If two/three types have the same count, then the program should print all two/three types and how many of each was entered-- e.g. "3 plain and dotted"

You’ll be marked on accuracy, efficiency and defensive programming.

Marking guidelines

Don't forget to login or register an account to submit your answer!

Happy algorithming!
« Last Edit: April 30, 2018, 11:37:33 am by JTrudeau »
Data Science, Finance || University of Sydney
== First in State for Software Design and Development 2017 ==
Advanced English | Maths Extension 1 | Maths Extension 2 | Economics | Software Design & Development | Chemistry

JTrudeau

  • Trendsetter
  • **
  • Posts: 109
  • Master of the Meeses
  • Respect: +90
Re: SDD Algorithm Contest (ALCON) | Week 1
« Reply #1 on: April 23, 2018, 09:16:18 am »
+2
BUMPING THIS POST.

There's still one week left! Submit your answers soon :)
Data Science, Finance || University of Sydney
== First in State for Software Design and Development 2017 ==
Advanced English | Maths Extension 1 | Maths Extension 2 | Economics | Software Design & Development | Chemistry

JTrudeau

  • Trendsetter
  • **
  • Posts: 109
  • Master of the Meeses
  • Respect: +90
Re: SDD Algorithm Contest (ALCON) | Week 1
« Reply #2 on: April 24, 2018, 08:32:45 am »
+1
I've done my solution - two questions:
- Does it have to be written in pseudocode? (I have pseudocode and a working Python script done, can submit either)
- Do we just... post our solutions as a public reply like this?

Hey there! Thanks for the message (you're amazing!).
To answer your two questions: Yes, pseudocode/flowchart please, as those are the accepted algorithm forms in the HSC, and the purpose of this is to get extra practice for the HSC.

And yep, a public reply just the way you've done. Please enclose your pseudocode using the [ code ] [ /code ] tags (remove the spaces). Four spaces is an indent. If you want, you can also enclose it in the [ spoiler ] [ /spoiler ] tags, which will hide it until you click on it. :)
Data Science, Finance || University of Sydney
== First in State for Software Design and Development 2017 ==
Advanced English | Maths Extension 1 | Maths Extension 2 | Economics | Software Design & Development | Chemistry

JTrudeau

  • Trendsetter
  • **
  • Posts: 109
  • Master of the Meeses
  • Respect: +90
Re: SDD Algorithm Contest (ALCON) | Week 1
« Reply #3 on: April 29, 2018, 12:59:37 pm »
0
Well then, here it is:

Fantastic, thank you for your entry! Please check back on Monday morning, when we'll release the feedback to this thread. :)

There is still time to submit your solution! Hope to see a couple more pop up!
Data Science, Finance || University of Sydney
== First in State for Software Design and Development 2017 ==
Advanced English | Maths Extension 1 | Maths Extension 2 | Economics | Software Design & Development | Chemistry

Opengangs

  • New South Welsh
  • Forum Leader
  • ****
  • Posts: 718
  • \(\mathbb{O}_\mathbb{G}\)
  • Respect: +480
Re: SDD Algorithm Contest (ALCON) | Week 1
« Reply #4 on: April 29, 2018, 11:02:18 pm »
+3
ALCON WEEK 1 FEEDBACK

Well done to anomalous who scored 5/7 (including 2 for the challenge). Fantastic start to their campaign. Remember that it's not too late if you didn't score any points now - there are heaps more coming your way with many varieties of algorithms, so stay tuned for those.

Everything you need for Week 1's problem can be found here. You can find your own entry and read the comments and feedback.

In the meantime, don't forget to check out Week 2's question.

Good luck everyone!

jasn9776

  • Forum Regular
  • **
  • Posts: 57
  • Respect: +4
Re: SDD Algorithm Contest (ALCON) | Problem 1: IKEO
« Reply #5 on: May 06, 2018, 10:00:54 pm »
0
[code ]
READ Input
fabric1[0, plain]
fabric2[0, striped]
fabric3[0, dotted]
fabricX[0, X] {make more modifiable}
WHILE input =! done
    FOR i from 1 to X
        IF Input = fabric(i)(1) THEN
            fabric(i)(0) = fabric(i)(0) + 1
        ENDIF
    NEXT i
ENDWHILE

Most popular type:
FindMax(Fabric1(0),Fabric2(0), Fabric3(0))

subroutine for find max
FINDMAX(number1, number2, number3... X)
currentmaxvalue = 0
FOR i = 0 to lengthofFINDMAX -1
    IF FINDMAX(i) > FINDMAX(currentmaxvalue) THEN
    currentmaxvalue = i
    ENDIF
Next i

print FINDMAX(i)

CASEWHERE
     Fabric1(0)=max: PRINT Fabric1(1)
     Fabric2(0)=max: PRINT Fabric2(1)
     Fabric3(0)=max: PRINT Fabric3(1)
ENDCASE
[/code ]

HSC 2018: English Adv(88) | Bio (90) | Phys(85) | Software Design (87) | 3U Math (41)

JTrudeau

  • Trendsetter
  • **
  • Posts: 109
  • Master of the Meeses
  • Respect: +90
Re: SDD Algorithm Contest (ALCON) | Problem 1: IKEO
« Reply #6 on: May 07, 2018, 12:19:52 pm »
0
Thanks jasn9776! I've updated the feedback sheet here, so please scroll to the bottom to see feedback on your entry! :)
Data Science, Finance || University of Sydney
== First in State for Software Design and Development 2017 ==
Advanced English | Maths Extension 1 | Maths Extension 2 | Economics | Software Design & Development | Chemistry