The Student Room Group

COMP3 - JUN 2016 Discussion Thread

Scroll to see replies

Original post by Lewis7_
I have to learn the entire IT3 course, the entire COMP3 course and the entire F293 Business course in one day for 3 exams tomorrow... You guys have it easy.

(Ive failed.)

Are you doing wjec it3
Reply 61
Original post by epic within
Are you doing wjec it3


Yup.
The grade boundaries for this are so ****ed lol.
Is anyone else in my position?
I need 58 on comp 3 for B grade
80 for A grade
86 for A*
Can anyone help me on question 1 for june 2011. How do we do it? the question is in the spoiler.

Spoiler

Original post by Ainsleyy
Can anyone help me on question 1 for june 2011. How do we do it? the question is in the spoiler.

Spoiler



You do 15 items / 2 (for half way in between ) which is 7.5 , u round up always so it's the 8th item = philip

you always want the item ur searching for to be inbetween the numbers ( now between 8 and 15)

Then you take the 8 + 15 /2 = 11.5 round up get 12th item = Timothy
12

8+12/2 = 10th item = Ravi
10+12 /2 = 11th item = Richard

For the second bit max number of items: 2^(max item) = 137
2 to the power of what gives 137?
2 to the power of 7 gives 128 which isnt enough
2 to the power of 8 gives 256
8 is the answer

if ur not good at maths i'm not to sure how else to explain
Original post by QuantumSylar
You do 15 items / 2 (for half way in between ) which is 7.5 , u round up always so it's the 8th item = philip

you always want the item ur searching for to be inbetween the numbers ( now between 8 and 15)

Then you take the 8 + 15 /2 = 11.5 round up get 12th item = Timothy
12

8+12/2 = 10th item = Ravi
10+12 /2 = 11th item = Richard

For the second bit max number of items: 2^(max item) = 137
2 to the power of what gives 137?
2 to the power of 7 gives 128 which isnt enough
2 to the power of 8 gives 256
8 is the answer

if ur not good at maths i'm not to sure how else to explain


Yep that all makes sense thanks. So always round up. And for the second part I just put 137 into log(base2)137 and got 7.something so I rounded up to 8. As log(base2)N is the complexity of binary search right?
Original post by Ainsleyy
Yep that all makes sense thanks. So always round up. And for the second part I just put 137 into log(base2)137 and got 7.something so I rounded up to 8. As log(base2)N is the complexity of binary search right?


yh exactly that
Original post by Teee123
we need to memorise pseudo codes???


Turns out I was wrong we do need to memorise some pseudo code. Im going to compile a list it turns out its not a lot so dont worry.
Original post by aelahi23


You were right about the pseudo code! Sorry :smile:
Reply 69
Original post by Ainsleyy
Turns out I was wrong we do need to memorise some pseudo code. Im going to compile a list it turns out its not a lot so dont worry.


Oh man I'm the worst at pseudo codes, I hope you're right and it's not much otherwise I am screwedddd. But thanks anyway.
Original post by Lewis7_
Yup.


same, at-least it's easier than COMP3 and you can learn almost all answers from past papers
Pseudo code:

Stacks:

PUSH:

If Stack is full
Then Error
Else
Increment TopOfStackPointer
Stack[TopOfStackPointer] Data
EndIf

POP:

If Stack is empty
Then Error
Else
Return Stack[TopOfStackPointer]
Decrement TopOfStackPointer
EndIf

Queues:
Can only find the pseudo code for Circular queues.

Add item:

If Queue is full
Then Error
Else
Increment RearPointer
If RearPointer > MaxIndex
Then RearPointer 1
Queue[RearPointer] Data
EndIf

Remove item:

If Queue is empty
Then Error
Else
Return Queue[FrontPointer]
Increment FrontPointer
If FrontPointer > MaxIndex
Then FrontPointer 1
EndIf


Insertion sort, bubble sort and binary search are all very complicated. I aint learning those... I think we will just need to be able to trace through them...?
And just a tip: if you can't remember all of it just write the correct error handling if statement at the beginning you can get 2 out of the 4 marks (normally) in the question.
(edited 7 years ago)
Reply 72
Original post by Ainsleyy
Pseudo code:

Stacks:

PUSH:

If Stack is full
Then Error
Else
Increment TopOfStackPointer
Stack[TopOfStackPointer] Data
EndIf

POP:

If Stack is empty
Then Error
Else
Return Stack[TopOfStackPointer]
Decrement TopOfStackPointer
EndIf

Queues:
Can only find the pseudo code for Circular queues.

Add item:

If Queue is full
Then Error
Else
Increment RearPointer
If RearPointer > MaxIndex
Then RearPointer 1
Queue[RearPointer] Data
EndIf

Remove item:

If Queue is empty
Then Error
Else
Return Queue[FrontPointer]
Increment FrontPointer
If FrontPointer > MaxIndex
Then FrontPointer 1
EndIf


Insertion sort, bubble sort and binary search are all very complicated. I aint learning those... I think we will just need to be able to trace through them...?
And just a tip: if you can't remember all of it just write the correct error handling if statement at the beginning you can get 2 out of the 4 marks (normally) in the question.


Ayyy thank you so much!
Does anyone have any good resources to recommend for floating point? I struggled with two's complement last year and can't wrap my head around this.
I'm doing this one. Should be a nice relax in the hall for 2 hours 30 minutes before doing a proper exam (OCR Chemistry Unit 5) in the afternoon!
Whats the difference between stack and dynamic?

What the difference between queue and stack also. Thanks
Bubble sort
variables
Numbers is array of integer of length 1 to 5
x,y, temporary of type integers
Check type of boolean

begin
check <== True
while x <= 5 and check = True do
while y <= 5 do
if Numbers[y<Numbers[y+1]
then Check <== Flase
Else
temporary <== Numbers[y+1]
Numbers[y+1] <== Number[y]
Numbers[y] <== Temporary
End of IF
Increment y
End of y While loop
Increment x
End of x while loop

the reason I used check boolean variable is to make the algorithm efficient because if a sort does not happen then the number being checked is already sorted so it needs to step out of the loop
(edited 7 years ago)
Binary Search

For sorted array called Numbers

3 pointer called Front, Middle and End

Middle <== (Front + End) Div 2 **Notice I said div and not "/" because Div gives a whole number**
If ItemLookingFor = Numbers[Middle]
Then Output Numbers[Middle]
Else
If ItemLookingFor < Numbers[Middle]
Then End <== Middle - 1
If ItemLookingFor > Numbers[Middle]
Then Front <== Middle + 1
End of IF
(edited 7 years ago)
Original post by Ainsleyy
Pseudo code:

Stacks:

PUSH:

If Stack is full
Then Error
Else
Increment TopOfStackPointer
Stack[TopOfStackPointer] Data
EndIf

POP:

If Stack is empty
Then Error
Else
Return Stack[TopOfStackPointer]
Decrement TopOfStackPointer
EndIf

Queues:
Can only find the pseudo code for Circular queues.

Add item:

If Queue is full
Then Error
Else
Increment RearPointer
If RearPointer > MaxIndex
Then RearPointer 1
Queue[RearPointer] Data
EndIf

Remove item:

If Queue is empty
Then Error
Else
Return Queue[FrontPointer]
Increment FrontPointer
If FrontPointer > MaxIndex
Then FrontPointer 1
EndIf


Insertion sort, bubble sort and binary search are all very complicated. I aint learning those... I think we will just need to be able to trace through them...?
And just a tip: if you can't remember all of it just write the correct error handling if statement at the beginning you can get 2 out of the 4 marks (normally) in the question.


To check if Stack or Queue is full you have to also write out the algorithm to check for that if they give you a bunch of pointer names to use if they don't then you don't need to write out the algorithm for error checking

so for Queues
IF FrontPointer = RearPointer
Then Output Error message "Queue is full"
Else .... so on

For Stacks
If TopPointer = TopArrayLimit
Then Output Error Stack is full
Else... so on
Reply 79
Original post by Teee123
One day left and I just started Communication Methods. Still have to do networks, server side and security. s**t.


I started revising after C3 earlier today if it makes you feel any better :P

Quick Reply

Related discussions

Latest