Bubble Sort Algorithm: Loops, Swaps and Early Exit
Bubble Sort must use an outer loop for passes and an inner loop for adjacent comparisons.
Outer Loop
The outer loop controls the passes. After each pass, the largest remaining unsorted value moves to the end of the current unsorted section.for (int pass = 0; pass < values.length - 1; pass++) {
// one Bubble Sort pass
}
Inner Loop
The inner loop compares adjacent values. The comparison range becomes shorter after every pass because the values at the end are already sorted.for (int i = 0; i &
Sustainability, Ecology and Environmental Ethics: Key Concepts
1.1 Sustainability
Sustainability: possibility that human and other life will flourish on the planet forever (Ehrenfeld). Sustainable development (Brundtland Report, 1987): meeting present needs without compromising future generations’ ability to meet their own needs.
Triple Bottom Line (Elkington, 1997): Planet = ecological; People = social; Prosperity = economic. Nested model: biosphere → society → economy; society and economy depend on nature.
System: connected elements forming a whole. Emergence:
Read MorePlant Physiology Study Notes: Auxin, ABA, Tropisms, and Photosynthesis
Plant Hormones and Growth Responses
1. Auxin (IAA) Precursor
Auxin (IAA) is naturally synthesized from the precursor amino acid tryptophan. Synthetic versions such as NAA, IBA, and 2,4-D are classified as plant growth regulators rather than hormones, because they are not made by the plant.
2. Auxin and Cell Elongation
Auxin increases the concentration of \(H^{+}\) ions in primary cell walls, which activates enzymes that loosen cellulose fibers. Increased turgor pressure then causes the plasticized cell
E-Commerce and Digital Business Models: Web Evolution, UX and Growth Strategies
Unit 1: The Evolution of the Web
- Web 1.0: Static and read-only, with no interaction. It had about 250,000 websites and 45 million users. Business models focused on content publishing and e-commerce (eBay, Amazon).
- Web 2.0: Users became active producers of user-generated content (UGC). It grew to about 80 million websites and 1 billion users, with blogs, podcasts, forums and social networks.
- Web 3.0: A decentralized web where machines read and interpret content, AI interacts with us in an almost human
Biology Notes: Key Concepts in Taxonomy, Plant Anatomy and Metabolism
1. Binomial Nomenclature – Rules
Binomial nomenclature is the scientific naming system using two words: Genus + species. The genus begins with a capital letter and the species with a small letter. Scientific names are written in italics or underlined separately when handwritten. Names are generally Latin or Latinised. Example: Mangifera indica.
2. Artificial and Natural Classification – Difference
Artificial: based on a few selected characters, mainly superficial features; does not show true relationships.
Read MoreFirewalls, Antivirus, Encryption, Access Control and IDS in Secure Environments
Discuss Firewalls, Antivirus, Encryption, Access Control, and IDS in a Secure Environment (10 Marks)
A secure information environment protects data, devices, networks, and applications from unauthorised access, malware, theft, and disruption. Multiple layers of security are used because no single control can prevent every attack.
1. Firewalls
A firewall filters network traffic using security rules. It can restrict unauthorised connections, inspect connection state, support network segmentation, and
Read MorePoetry Terms: Key Literary Devices Explained
1. Basic Poetry Terms
Speaker: Voice telling the poem (not always the poet).
Stanza: Group of lines, like a paragraph.
Theme: Main message or lesson.
Tone: Speaker’s attitude (angry, happy, sad).
Mood: Feeling created in the reader.
Imagery: Description using the five senses.
Diction: Word choice.
Symbolism: Something that represents a bigger idea (dove = peace).
Allusion: Reference to something famous (Romeo = romantic).
2. Sound Devices
Alliteration: Repeated beginning consonant sounds (Silly snakes slither)
EECS 3213 Lecture 1: Communication Networks, Switching and Topologies
EECS 3213 — Lecture 1: Introduction
Communication Networks
Communication network: Equipment (computers, routers, switches, modems, servers, software) and facilities (copper, coaxial, fiber, air) that enable information transfer.
- Direct-link: One physical link with no intermediate devices.
- Networked: Multiple links and intermediate devices.
- LAN (Local Area Network): Small area, privately owned, high-speed, resource sharing.
- WAN (Wide Area Network): Large geographical area, long-distance communication.
Simulated Annealing, Evolutionary Computing and Neural Networks Explained
(a) What is simulated annealing?
Simulated annealing is an optimization technique inspired by the cooling process of metals, used to find near-optimal solutions.
(b) Define evolutionary computing.
Evolutionary computing is a problem-solving approach inspired by natural evolution, using selection, mutation, and crossover.
(c) What is a ridge in hill climbing?
A ridge is a narrow, sloping region in the search space that makes it difficult for hill climbing to reach the optimum.
(d) What is meant by a search
Read MoreDiplomatic Missions, Consular Relations and Spain’s Cooperation Policy
Diplomatic Missions and Spanish Embassies
Q1. The Diplomatic Mission (Vienna 1961) and Spanish Embassies
The 1961 Vienna Convention on Diplomatic Relations is the main treaty on diplomatic law. It regulates permanent diplomatic missions. It is declaratory: it writes down old customary rules, and it also adds some new ones. A diplomatic mission is a group of people and material resources that one State (the sending State) places in another State (the receiving State) to represent it. Its basic principle
Read More