Computer A Level Notes
Computer A Level Notes
==Serial les:== contains records that have no de ned di erent key, the next position in the le is used. this
order. A text le may be a serial le where the le has is why a search will involve direct access possibly
repeating lines which are de ned by an end of line followed by a limited serial search. That's why it's
character(s). There's no end of record character. A record considered partly sequential and partly serial.
in a serial le must have a de ned format to allow data to File access:
be input and output correctly. To access a speci c record, The value in the key eld is submitted to the hashing
it has to go through every record until found. algorithm which then provides the same value for the
File access: Successively read record by record until the position in the le that was provided when the algorithm
data required is found thus very slow. Uses: was used at the time of data input. It goes to that hashed
Batch processing position and through another short linear search because
Backing up data on magnetic tape of collisions in the hashed positions. Fastest access.
Banks record transactions involving customer To edit/delete data:
accounts every time there is a transaction Only create a new le if the current le is full. A deleted
==Sequential les:== has records that are ordered and is record can have a ag set so that in a subsequent reading
suited for long term storage of data and thus is process the record is skipped over. This allows it to be
considered an alternative to a database. A key eld is overwritten.
required for a sequential le to be ordered for which the Uses:
values are unique and sequential. This way it can be Most suited for when a program needs a le in which
easily accessed. A sequential database le is more individual data items might be read, updated or deleted.
e cient than a text le due to data integrity, privacy and
less data redundancy. A change in one le would update Factors that determine the le
any other les a ected. Primary keys from the
DBMS(database management system) need to be unique organization to use:
but not ordered unlike the key eld from the sequential
les which need to be ordered and unique. A particular How often do transactions take place, how often does
record is found by sequentially reading the value of the one need to add data?
key eld until the required value is found. How often does it need to be accessed, edited, or
File access: deleted?
Successively read the value In the key eld until the
required key is found. 1.3. Real numbers and normalized
To edit/delete data:
Create a new version of the le. Data is copied from the
oating-point representation
old le to the new le until the record is reached which
Real number: A number that contains a fractional part.
needs editing or deleting. For deleting, reading and
Floating-point representation: The approximate
copying of the old le continue from the next record. If a
representation of a real number using binary digits.
record has been edited, the new version is written to the
new le and the remaining records are copied to the new Format: Number = ±Mantissa × BaseExponent
le. Mantissa: The non-zero part of the number.
==Direct access/random access les:== access isn't Exponent: The power to which the base is raised to in
de ned by a sequential reading of the le(random). It's order to accurately represent the number.
well suited for larger les as it takes longer to access Base: The number of values the number systems allows a
sequentially. Data in direct access les are stored in an digit to take. 2 in the case of oating-point
identi able record which could be found by involving representation.
initial direct access to a nearby record followed by a
The oating point representation stores a value for the
limited serial search. The choice of the position chosen
mantissa and a value for the exponent.
must be calculated using data in the record so the same
A de ned number of bits are used for what is called the
calculation can be carried out when subsequently there's
signi cant/mantissa, +-M. Remaining bits are for the
a search for the data. One method is the hashing
exponent, E. The radix, R is not stored in the representation
algorithm which takes the key eld as an input and
as it has an implied value of 2(representing 0 and 1's). If a
outputs a value for the position of the record relative to
real number was stored using 8 bits: four bits for the
the start of the le. To access, the key is hashed to a
mantissa and four bits for the exponent with each using two
speci c location. This algorithm also takes into account
complement representation. The exponent is stored as a
the potential maximum length of the le which is the
signed integer. The mantissa has to be stored as a xed point
number of records the le will store.
real value. The binary point can be in the beginning after the
eg: If the key eld is numeric, divide by a suitable large
rst bit(immediately after the sign bit) or before the last bit.
number and use the remainder to nd a position. But
The former produces smaller spacing between the values
we won't have unique positions. If a hash position is
calculated that duplicates one already calculated by a
that can be represented and is more preferred. It also has a Usually, the choice for the total number of bits will be
greater range than the xed representation. provided as an option when the program is written,
however, the split between the two parts will have been
determined by the oating point processor.
If there were a choice, it's convenient to note that
increasing the number of bits for the mantissa would give
better precision but would leave fewer bits for the
exponent thus reducing the range of possible values and
vice versa. For maximum precision, it is necessary to
normalize a oating point number.
Optimum precision will only be made once full use is
made of the bits in the mantissa therefore using the
largest possible magnitude for the value represented by
the mantissa.
Also, the two most signi cant bits must be di erent. 0 1
for positives and 10 for negatives.
-they both equal 2 but the most precise is the second one
with the, higher bits in the mantissa.
\
0.125 * 2^4 = 2 0 001 0100
0.5 * 2^2 = 2 0 100 0010
-For negatives.
eg: One use of oating point numbers are in extended packets to hold all of the data. Each packet consists of a
mathematical procedures involving repeated calculations like header plus the user data. TCP needs to ensure safe
weather forecasting which uses the mathematical model of delivery and that any response is directed back to the
the atmosphere. application protocol. The header has a port number
which identi es the application layer protocol at the
sending and receiving end system (however the TCP isn't
2. Communication and concerned with the receiving end system). If the packet is
one of a sequence, a sequence number is included to
Internet technologies ensure eventual correct reassembly of the user data. The
TCP is connection oriented, initially just one packet of a
sequence is sent to the network layer. Once the
2.1. Protocols
connection has been established, TCP sends the other
Protocols are essential for successful transmission of data packets and receives response packets containing
over a network. Each protocol de nes a set of rules that must acknowledgements. This allows missing packets to be
be agreed between sender and receiver. At the simplest identi ed and resent.
level, a protocol could de ne that a positive voltage TCP/IP Suite: A common protocol used to send data over
represents a bit with value 1. At the other extreme, a a network.
protocol could de ne the format of the rst 40 bytes in a Protocols are split into separate layers, which are
packet. The complexity of networking requires a very large arranged as a stack.
number of protocols, a protocol suite is a collection of They service each other thus maintaining the ow of
related protocols. TCP/IP is the dominant protocol suite for the data.
internet usage. Layer: A division of the TCP/IP suite.
Stack: A collection of elements/protocols/layers.
Protocol: A set of rules governing communication
between computers.
Ensures the computers that communicate understand
each other.
MAC address: A unique number assigned to each device’s
networking hardware across the world.
IP address: A unique number assigned to each
node/networking device in a network.
Port number: A software-generated number that speci es
an application or a process communication endpoint
attached to an IP address.
IP: Internet Protocol – The function of the network layer,
and the IP, is to ensure correct routing over the internet.
To do so, it takes the packet received from the transport
Layer Purpose
layer and adds a further header containing the IP Application Encodes the data being sent
addresses of both the sender and receiver. To nd the IP Adds IP addresses stating where the
Network/Internet
address of the receiver, the DNS system can be used to data is from and where it is going
nd the address corresponding to the URL supplied in the Adds MAC address information to
user data. The IP packet(datagram) is sent to the data link specify which hardware device the
layer and therefore to a di erent protocol suite. The data Link message came from and which
link layer assembles datagrams into frames. Transmission hardware device the message is
now begins. Once the IP packet has been sent to the data going to
link layer, IP has no further duty. IP is a connectionless
Enables the successful transmission
service so if it receives a packet which contains an Physical
of data between devices
acknowledgement of a previously sent packet, it will
simply pass the packet on to TCP with no awareness of
When a message is sent from one host to another:
the content.
Sender side: Application Layer
TCP: Transfer Control Protocol. If an application is
Encodes the data in an appropriate format.
running on an end system where a message is to be sent
Sender side: Transport Layer
to a di erent end system the application will be
The data to be sent is broken down into smaller
controlled by an application layer protocol. The protocol
chunks known as packets
will transmit the user data to the transport layer, the TCP
Sender side: Network Layer
operating in the transport layer now has to take
IP addresses (sender and receiver) and a
responsibility for ensuring the safe delivery of the
checksum are added to the header
message to the receiver. To do this it creates su cient
download rare chunks for preference. Each time a 6. Client sends an encrypted message to the server
rare chunk is downloaded it automatically becomes using the server’s public key.
less rare. 7. The server can use its private key to decrypt the
3. How do peers encourage other peers to provide message and get data needed for generating
content rather just using the protocol to download for symmetric key .
themselves? This answer requires dealing with the 8. Both server and client compute symmetric key (to be
free riders/leachers who only download. The solution used for encrypting messages) // session key
is for a peer to initially randomly try other peers but established.
then to continue to upload to those peers that 9. The client sends back a digitally signed
provide regular downloads. If a peer is not acknowledgement to start an encrypted session.
downloading or downloading slowly, it will eventually 10. The server sends back a digitally signed
be isolated/choked. acknowledgement to start an encrypted session.
Transport Layer Security (TLS) Star topology: A network topology in which each
workstation is connected to a central node/connection
TLS(transport layer security) protocol: Purpose of TLS is to point through which the network is established.
provide for secure communication over a network, maintain
The central node (hub) re-directs and directs the
data integrity and add an additional layer of security. TLS packets according to the data tra c and their
provides improved security over SSL(secure sockets layer). recipient.
TLS is composed of two layers: record protocol and Wireless networks: A computer network that uses
handshake protocol. TLS protects this information by using wireless data connections between its network
encryption. It also allows for authentication of servers and
components.
clients. A handshake process has to take place before any Bluetooth: A type of short-range wireless communication
exchange of data using the TLS protocol. The handshake that uses
process establishes details about how the exchange of data Wi-Fi OR IEEE 802.11x.– A type of wireless communication
will occur. Digital certi cates and keys are used. The that allows the users to communicate within a particular
handshake process starts with: area/ access internet.
1. The client sending some communication data to the
Component Purpose in a LAN
server.
Allows di erent networks to
2. The client asking the server to identify itself. Switch
connect
3. The server sending its digital certi cate including the
public key. Directs the incoming packets
Router
4. The client validates (the server’s) TLS Certi cate. into
5. The client sends its digital certi cate (to the server if
requested).
Component Purpose in a LAN for the sender and receiver and is the reason they are
Provides a medium for the called the MAC addresses.
storage, sharing of usage of
Servers
les and applications for its Hardware Connection Device
users
Consists of the electronic An end system on an ethernet LAN needs a network
Network Interface Cards circuitry required to interface card(NIC). Each NIC has a unique physical
(NICs) communicate with other address, MAC address. The end system itself has no
networks/devices. identi cation on the network. If the NIC is removed and
inserted into a di erent end system, it takes the address
with it.
Ethernet: an array of networking technologies and
The simplest device used for the center of the star
systems used in local area networks (LAN), where
topology LAN is the hub which ensures that any incoming
computers are connected within a primary physical
communication is broadcast to all connected end
space.
systems. However, the use of a hub is not restricted to
CSMA/CD:
supporting an isolated network, it can have a hierarchical
Standard ethernet was implemented on a LAN con gured
con guration with one hub connected to other hubs,
as a bus or a star topology with a hub as the central
which support individual LANs. A hub can also have a
device where the transmission was broadcast in a
built in broadband modem which allows all of the end
connectionless service. Because of the broadcast
user systems on the LAN to have an internet connection
transmission, there was a need for the access to the
shared medium by end systems to be controlled. If there when this modem is connected to a telephone line.
A switch can function as a hub but it's more intelligent
wasn’t any control, two messages sent at the same time
and can keep track of the addresses of connected
would collide and each message would be corrupted. The
devices, this allows a switch to send an incoming
method adopted was CSMA/CD(carrier sense multiple
transmission to a speci c end system as a unicast. This
access with collision detection). If a frame was being
reduces the amount of network tra c compared to the
transmitted there was a voltage level on the ethernet
hubs.
cable which could be detected by an end system. If this
A router is the most intelligent of the connecting devices.
was the case, the protocol de ned at a time that the end
It can function as a switch and make decisions about
system had to wait before it tried again. However
because two end systems could have waited then both which device it will transmit a received transmission to.
decided to transmit at the same time collisions could still The main use of routers is in the backbone fabric of the
internet. Nearer to the end systems, a router may
happen thus there was also a need to incorporate a
function as a gateway, as a network address translation
means for an end system to detect a collision and to
box or be combined with a rewall.
discontinue transmission if a collision occurred. Before
transmitting a device checks if the channel is busy. If it is
busy the device waits, if channel free data is sent. When
WIreless networks
transmission begins the device listens for other devices
The dominant technology is no longer using cables now, it's
also beginning transmission. If there is a collision,
wireless. The following are discussed in order of increasing
transmission is aborted/ transmitting a jam signal. Both
scale of operation.
devices wait a (di erent) random time, then try again. The
modern implementation of ethernet is switched. The star Bluetooth: this has been standardized as IEEE802.15.
con guration has a switch as the central device which Communication is by short range radio transmission in a
controls transmission to speci c end systems. Each end con ned area. A Bluetooth LAN is an ad hoc network thus
system is connected to the switch by a full duplex link so no de ned infrastructure and network connections are
no collision is possible along the link and therefore created spontaneously. eg Wireless keyboard
CSMA/CD is no longer needed as collisions are Wi-Fi: aka WLAN and is a wireless ethernet known as
impossible. Ethernet is the most likely protocol to be IEEE802.11. This is a wireless LAN protocol which uses
operating in the data link layer when the IP in the radio frequency transmission. Mostly a Wi-Fi LAN is
network layer sends a datagram to the data link layer. centered on a wireless access point in an infrastructure
When the data link layer uses ethernet, the protocol network and not an ad hoc network. The wireless access
de nes 2 sub layers. The upper one is the logical link point communicates wirelessly with any end systems that
layer which handles ow control, error control and part of have connected to the device. It also has a wired
the framing process. The lower is the media access connection to the internet. •WiMAX(worldwide
control(MAC) sublayer which completes the framing interoperability for microwave access): an IEEE802.16 is a
process and de nes the access method. The MAC layer protocol for a MAN or WAN. It's designed for use by
transmits the frames that contain the physical address PSTNs to provide broadband access to the internet
without having to lay underground cables. Local
A B Output
3.1. Logic gates & circuit design 0 0 1
0 1 1
Logic gates: A component of a logical circuit that can perform 1 0 1
a Boolean operation (logical function).
1 1 0
AND Gate: A.B = X
A B X
0 0 0
0 1 0
1 0 0
1 1 1
NOR Gate: A + B =X
A B Output
0 0 1
0 1 0
1 0 0
1 1 0
OR Gate: A + B =X
A B Output
0 0 0
0 1 1
1 0 1
1 1 1
A B Output
0 0 0
0 1 1
1 0 1
A B Output Adsorption
1 1 0 A. (A + B ) = A
A + A.B = A
De Morgan’s Law
(A.B ) = A + B
(A + B) = A.B
{S15-P33} Question: 5
a) i. Complete the truth table for this logic circuit:
Circuit 1: X =
Circuit 2: X =
Input Output
ii. Write the De Morgan’s Law which is shown by your
A B S C
answers to part (a) and part (b)(i).
0 0 0 0
0 1 1 0 c) Write the Boolean algebraic expression corresponding to
the following logic circuit:
1 0 1 0
1 1 0 1
3.2. Boolean algebra d) Using De Morgan’s laws and Boolean algebra, simplify your
answer to part (c).
Double Complement: A =A
Identity Law Show all your working.
1.A = A Solution:
0+A = A Part a):
Null Law
0.A = 0 i. Assume that the letter “C” equates to the rst
1+A = 1 function/logic gate.
Idempotent Law A+B =C
A.A = A
A B C
A+A=A
Inverse Law 0 0 0
A.A = 0 0 1 1
A+A = 1 1 0 1
Commutative Law 1 1 1
A.B = B.A
A+B = B+A 0 = 0 $$
Associative De Morgan's law: the inverse of a Boolean product becomes
(A.B).C = A.(B.C) the sum of the inverses of the individual values in the
(A + B) + C = A + (B + C) product. The inverse of a Boolean sum is the product of the
Distributive Law individual inverses.
A + B.C = (A + B).(A + C) Not (A and B) is the same as Not A or Not B.
A. (B + C ) = A.B + A.C
Not (A or B) is the same as Not A and Not B. Karnaugh maps: a method of obtaining a Boolean algebra
expression from a truth table involving the
RISC processors give the opportunity of providing e cient Bene ts of using Karnaugh Maps:
pipelining. Pipelining is instruction level parallelism. Its Minimises the number of Boolean expressions.
underlying principle is that the fetch decode execute cycle Minimises the number of Logic Gates used, thus
can be separated into a number of stages. One of the providing a more e cient circuit.
possibilities include: Methodology
Try to look for trends in the output, thus predict the
1. Instruction fetch (IF)
presence of a term in the nal expression
2. Instruction decode (ID)
Draw out a Karnaugh Map by lling in the truth table
3. Operand fetch (OF)
values into the table
4. Instruction execute (IE)
Column labelling follows Gray coding sequence
5. Result write back (WB)
Select groups of ‘1’ bits in even quantities (2, 4, 6 etc),
PIPELINING FOR FIVE STAGE INSTRUCTION HANDLING if not possible then consider a single input as a group
Note: Karnaugh Maps wrap around columns
Within each group only the values that remain
constant are retained
{S17-P31} Question: 3
Consider the following logic circuit, which contains a
redundant logic gate.
Scheduling ensure that the computer system is able to An OS has to be structured in order to provide a platform for
serve all requests and obtain a certain quality of service. resource management and the provision of facilities for
Interrupt: users. The logical structure provides 2 modes of operation:
Causes OS kernel to invoke ISR
The kernel may have to decide on priority 1. The user mode is the one available for the user or an
Register values stored in PCB application program.
Reasons 2. Privileged/kernel mode has the sole access to parts of
Errors the memory and to certain system functions that the
Waiting for I/O user mode cant access.
Scheduler halts process
Low-level scheduling: Allocation speci c processor 4.3. Virtual machine
components to complete speci c tasks.
Low-level scheduling algorithms Virtual machine:
Preemptive: Will stop the process that would have Process interacts with software interface provided by
otherwise have continued to execute normally. the OS. This provides exact copy of hardware.
First-come- rst-served OS kernel handles interaction with actual host
Non-preemptive hardware
FIFO(First In First Out) queue
Round-robin Pros Cons
Allocates time slice to each process Allows more than one OS to Performance drop from
Preemptive run on a system native OS
Can be FIFO queue Allows multiple copies of the Time and e ort needed for
Does not prioritize same OS implementation is high
Priority-based
Most complex Examples and usage:
Priorities re-evaluated on queue change
Priority calc. Requires computation Used by companies wishing to use the legacy software on
Criteria for priority time newer hardware and server consolidation companies
Estimated time of execution Virtualizing machines allows developers to test
Estimated remaining time of execution applications on a multitude of systems without having to
Is the CPU/IO bound? make expensive hardware purchases.
Length of time spent in waiting queue
Paging:
4.4. Translation software
Process split into pages, memory split into frames
Lexical analysis: The process of converting a sequence of
All pages loaded into memory at once
characters to a sequence of tokens.
Virtual memory: Tokens: Strings with an assigned meaning
No need for all pages to be in memory Syntax analysis: The process of double-checking the code
CPU address space thus larger than physical space for grammar mistakes (syntax errors).
Addresses resolved by memory management unit Code generation: The process by which an intermediate
Bene ts code is generated after syntax analysis.
Not all of the program has to be in memory at Optimization: A process in which the code is edited to
once make improvements in e ciency.
Large programs can be run with or without large
physical memory
Process
All pages on disk initially
One/more loaded into memory when process
‘ready’
Pages replaced from disk when needed
Can be done with FIFO queue or usage-
statistics based algorithm
Disk thrashing: Perpetual loading/unloading of pages due
to a page from disk immediately requiring the page it
replaced**.**
and can therefore decrypt the message. This is not for individuals, the public key must be made available in a way
con dential messages but can be used to verify who the that ensures authentication. The would-be receiver would
sender was. Only the sender has the private key and the need to obtain the digital certi cate to allow safe public key
public keys only work with that one speci c private key. delivery:
Therefore, used this way, the message has a digital
signature identifying the sender. However the digital 1. An individual(A) who is a would-be receiver and has a
signature is associated with an encryption of the whole public-private key pair contacts a local CA.
message. 2. The CA con rms the identity of A.
Cryptographic one way hash function creates from the 3. A's public key is given to the CA.
message a number, uniquely de ned for the particular 4. The CA creates a public-key certi cate(a digital
message, a digest. The private key is used as a signature certi cate) and writes A's key into this document.
for this digest. This speeds up the process of con rming 5. The CA uses encryption with the CA's private key to
the sender's identity. add a digital signature to this document.
It is assumed that the message is transmitted as plaintext 6. The digital certi cate is given to A.
together with the digital signature as a separate le. The 7. A posts the digital certi cate on a website.
same public hash key function is used that was used by
![PROCESSES INVOLVED IN OBTAINING A DIGITAL
the sender so the same digest is produced if the message
CERTIFICATEThe individual places the digital certi cate on
has been transmitted without alteration. The decryption
that person's website but you can post it on a website
of the digital signature produces an identical digest if the
designed speci cally for keeping digital certi cate data.
message was genuinely sent by the original owner of the
Alternatively, a digital certi cate might be used solely for
public key that the receiver has used. This allows the
authenticating emails. Once a signed digital certi cate has
receiver to be con dent that the message is both
been posted on a website, any other person wishing to use
authentic and unaltered. However someone might forge
A's public key downloads the signed digital certi cate from
a public key and pretend to be someone else. Therefore,
the website and uses the CA's public key to extract A's public
there is a need for a more rigorous means of ensuring
key from the digital certi cate. For this overall process to
authentication. This can be provided by a Certi cation
work there is a need for standards to be de ned.
Authority (CA) provided as part of a Public Key
Infrastructure (PKI).
5.3. Encryption protocols
SSL and TLS encryption protocols are used in client-server
applications.
SSL(Secure Socket Layer) and TLS(Transport Layer
Security) are two closely related protocols providing
security in using the Internet. TLS is a slightly modi ed
version of SSL. The main use of SSL is in the client server
application. The interface between an application and
TCP uses a port number. In the absence of a security
protocol, TCP services an application using the port
number. The combination of an IP address and a port
number is the socket. When the SSL protocol is
implemented it functions as an additional layer between
TCP in the transport layer and the application layer. When
the SSL protocol is in place, the application protocol HTTP
becomes HTTPS.
Provides:
Encryption
Compression of data
Integrity checking
Connection process:
Virus: tries to replicate inside other executable programs. Split the data into two or more prede ned groups. Example:
Worm: runs independently and propagates to other spam email ltering where emails are split into either spam
network hosts. or not spam.
Spyware: collects info & transmits to another system.
Phishing: email from seemingly legit source requesting
con dential info.
Pharming: setting up a bogus website that appears to be
legit.
Limitations
A lack of heuristics
Dijkstra’s algorithm has no notion of the overall shortest
direction to the end goal, so it will actually spend a lot of
Non time searching in completely the wrong direction if the
Linear Regression routes in the wrong direction are shorter than the route
Used where there is a correlation but it is not linear in the correct direction. It will nd the shortest route in
the end but it will waste a lot of time.
In small networks this isn’t a problem but when you have
massive networks (like road networks or the internet)
then it will result in massive ine ciencies.
Negative Weighted Costs
On physical networks with physical distances you can’t
have negative weights, but one some networks where
you are calculating costs you might have negative costs
for a particular leg. Dijkstra’s cant handle these negative
costs.
Directed networks
Dijkstra’s algorithm doesn’t always work best when there
are directed networks (such as motorways that only run
Clustering
in one direction.
Split the data into smaller groups or clusters based on
certain features. The programmer might specify a target
number of groups or let the algorithm decide. 6.4. A* Algorithm
One of the biggest problems with Dijkstra’s algorithm is
that it is that it has the potential to be ine cient when
searching for the shortest path, because it just looks for
the next shortest leg.
A* is an informed search algorithm, or a best- rst search,
meaning that it is formulated in terms of weighted
graphs: starting from a speci c starting node of a graph,
it aims to nd a path to the given goal node having the
smallest cost (least distance travelled, shortest time, etc.).
It does this by maintaining a tree of paths originating at
the start node and extending those paths one edge at a
time until its termination criterion is satis ed.
At each iteration of its main loop, A* needs to determine
which of its paths to extend. It does so based on the cost
of the path and an estimate of the cost required to
extend the path all the way to the goal.
Trained model is ready to test \n The trained model can then be deployed \n
Un supervised Learning
7. Computational thinking
and problem-solving
7.1. Big O Notation
What is Big O Notation?
Time Complexity
Time complexity refers to the growth in the number of
instructions executed (and therefore the time taken) as
the length of the array to be searched increases.
Space Complexity
Space complexity refers to the growth in the size of
memory space that is required as the length of the array
is increased.
Algorithm Performance
There are a number of factors that a ect the
performance of search / sorting algorithms. Some
algorithms perform well with high entropy (randomness)
data, other algorithms work better when the data is
partially sorted in some manner. This means that no one At each iteration, insertion sort removes one element from
algorithm works best in every situation and the nature of the input data, nds the location it belongs within the sorted
the data being sorted needs to considered. list, and inserts it there. It repeats until no input elements
remain.
Merge Sort Lighter bubbles rise to the top, Heavier ones sink to the
bottom.
Divide and Conquer Paradigm
7.3. Recursion
Recursion is a function which it call itself