You are Here: Home

# COMP3 - JUN 2016 Discussion Thread

Announcements Posted on
Four hours left to win £100 of Amazon vouchers!! Don't miss out! Take our short survey to enter 24-10-2016
1. 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.)
2. (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
3. (Original post by epic within)
Are you doing wjec it3
Yup.
4. The grade boundaries for this are so ****ed lol.
Is anyone else in my position?
I need 58 on comp 3 for B grade
86 for A*
5. Can anyone help me on question 1 for june 2011. How do we do it? the question is in the spoiler.
Spoiler:
Show
6. (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:
Show
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

if ur not good at maths i'm not to sure how else to explain
7. (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

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?
8. (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
9. (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.
10. You were right about the pseudo code! Sorry
11. (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.
12. (Original post by Lewis7_)
Yup.
same, at-least it's easier than COMP3 and you can learn almost all answers from past papers
13. 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.

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.
14. (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.

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!
15. 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.
16. 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!
17. Whats the difference between stack and dynamic?

What the difference between queue and stack also. Thanks
18. (Original post by KnightCode)
Whats the difference between stack and dynamic?

What the difference between queue and stack also. Thanks
Static (assuming arrays): fixed range, always reserves a particular amount of memory, even if there's actually no data
Dynamic (linked lists): the range depends on the quantity of data, so you don't use more memory than you need

--------------
Queue: FIFO (First in First out) structure. The item at the "front" of the queue (where the "head" or "front" pointer) is the first bit of data to be manipulated with (e.g. passed through a function)

Stack: LIFO (Last in First out) structure. The most recently added item will be the first to be manipulated. Imagine a stack of dishes, you can only handle the topmost dish. That's a stack.

Hopefully this helps.
19. 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
20. 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

## Register

Thanks for posting! You just need to create an account in order to submit the post
1. this can't be left blank
2. this can't be left blank
3. this can't be left blank

6 characters or longer with both numbers and letters is safer

4. this can't be left empty
1. Oops, you need to agree to our Ts&Cs to register

Updated: June 23, 2016
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Today on TSR

### Who is getting a uni offer this half term?

Find out which unis are hot off the mark here

Poll
Useful resources