AQA Alevel Computer Science Paper 1 EXAM 2024
what is the most common hashing algorithm - ANSWER-to divide the key by the number of available addresses and take the remainder as the address
what is the pseudocode for adding an element into the queue - ANSWER-sub unqueue(newitem)
if isfull the
o...
what is the most common hashing algorithm - ✔✔✔ANSWER-to divide the key
by the number of available addresses and take the remainder as the address
what is the pseudocode for adding an element into the queue - ✔✔✔ANSWER-sub
unqueue(newitem)
if isfull the
output ' queue is full'
else
rear < -- (rear + 1) MOD maxsize
,q[rear] <-- newitem
size <-- size + 1
end if
end sub
what is the pseudocode for initialising a queue - ✔✔✔ANSWER-sub initialise
front <-- 0
rear <-- -1
size<--0
maxsize <-- size of the array
end sub
what is the psuedocode for adding an item to a stack - ✔✔✔ANSWER-sub
push(item)
if isfull then
output ' stack is full'
else
top <-- top + 1
s(top) <-- item
end if
end sub
draw an example of a callstack - ✔✔✔ANSWER-
explain how a priority queue can be implemented - ✔✔✔ANSWER-by checking
the priority of each item in the queue starting at the rear and moving it along one
, place until an item with the same or lower priority is found at which point the new
item can be inserted
explain how a queue works - ✔✔✔ANSWER-new elements are added at the end
of a queue and elements are retreived from the front of the queue. The sequence of
items in a queue is determined by the order in which they are inserted
explain how functional abstraction is used in linked lists - ✔✔✔ANSWER-as
items are added to the list the pointers are adjusted to point to a new memory
locatio taken from the heap and when items are deleted pointers are again adjusted
and the freed up memory is de allocated and returned to the heap
explain how items are deleted from lists - ✔✔✔ANSWER-items are moved up to
fill the empty space then the last element is replaced with a blank
explain how to insert a new name into a list - ✔✔✔ANSWER-test for list already
full quit if it is
determine where new item needs to be inserted
starting at the end of the list move other items along one place
insert new item in correct place
how are hash functions created from alphanumeric strings - ✔✔✔ANSWER-e.g
CAB could be converted into ASCII values then adding those values and modding
it to get the remainder
how are lists implemented in python - ✔✔✔ANSWER-linked lists
Les avantages d'acheter des résumés chez Stuvia:
Qualité garantie par les avis des clients
Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.
L’achat facile et rapide
Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.
Focus sur l’essentiel
Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.
Foire aux questions
Qu'est-ce que j'obtiens en achetant ce document ?
Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.
Garantie de remboursement : comment ça marche ?
Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.
Auprès de qui est-ce que j'achète ce résumé ?
Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur NURSING2EXAM. Stuvia facilite les paiements au vendeur.
Est-ce que j'aurai un abonnement?
Non, vous n'achetez ce résumé que pour €16,59. Vous n'êtes lié à rien après votre achat.