Binary Tree Operations, Sorting Algorithms & CLL Pseudocode

Binary Tree Insert

1. ptr = ROOT; flag = FALSE
2. While (ptr != NULL) and (flag == FALSE) do
3.   Case: ITEM < ptr->DATA
4.     ptr1 = ptr
5.     ptr = ptr->LCHILD
6.   Case: ITEM > ptr->DATA
7.     ptr1 = ptr
8.     ptr = ptr->RCHILD
9.   Case: ptr->DATA = ITEM
10.    flag = TRUE
11.    Print "ITEM already exists"
12.    Exit
13.  EndCase
14. EndWhile
15. If (ptr == NULL) then
16.   new = GetNode(NODE)
17.   new->DATA = ITEM
18.   new->LCHILD = NULL
19.   new->RCHILD 
Read More

HACCP Food Safety System Requirements and Principles

HACCP: Hazard Analysis and Critical Control Points

HACCP stands for Hazard Analysis and Critical Control Points. It is the adaptation of the Castilian acronym ALARA HACCP. It is a recognized international system to manage food safety. It is based on applying a preventive system to ensure the final product is free of hazards.

In 1993 the European Union made the application of HACCP in food businesses obligatory by Directive 93/43/EEC. In 1996 the relationship was established by Decree 2207/1995 laying

Read More

BNS 2023: Property, Document and Reputation Offences

I. Offences Against Property

Property offences protect the security of ownership, possession, and lawful enjoyment of movable and immovable property. Under the Bharatiya Nyaya Sanhita, 2023 (BNS), these offences are found in Chapter XVII and include theft, extortion, robbery, dacoity, criminal misappropriation, criminal breach of trust, cheating, and mischief. They are based on the principle that no person should unlawfully deprive another of their property or interfere with it dishonestly.

1. Theft

Read More

Sociological Concepts: Groups, Status, Stratification, and Law

1. Social Groups: Meaning, Characteristics, and Classification

Meaning of Social Groups

A social group is a set of individuals who interact regularly, share a sense of identity, and are bound by common norms, values, or goals. Unlike mere aggregates (like people waiting at a bus stop), a social group provides structure, stability, and predictability to interactions. Members perceive themselves as part of a distinct entity and develop a sense of belonging and loyalty.

Example: Family, student clubs,

Read More

Sedimentary Rocks: Detrital, Organic & Chemical Types

Detrital (Mechanical) Origin

Detrital or mechanical origin: mineral particles formed by the mechanical disintegration of other rocks. These particles are transported by agents such as water and accumulate as sand, gravel, blocks, ash and other clastic material.

Sandstone

Sandstone: an intermediate clastic rock formed from mechanically derived granules. It consists of consolidated masses of sand held together by a cement. Sandstone is essentially composed of quartz sand.

Cement (Matrix)

Cement: the material

Read More

English Grammar Structures Reference

English Grammar Structures

Perfect Continuous Tenses

  • Present Perfect Continuous: I have been waiting.
  • Past Perfect Continuous: I had been studying.

Conditional Sentences

Conditionals describe different types of hypothetical situations:

  • Zero Conditional: Facts or truths. If + [simple present], … [simple present].
  • First Conditional: Real possibilities in the future. If + [simple present], … will + [infinitive].
  • Second Conditional: Unreal or improbable situations in the present or future. If + [simple
Read More

English Grammar Structures and Sentence Analysis

Grammatical Structures and Examples

0. Relative Clauses

Who, that, which, etc.

1. Appositive

Dr. Sanders, the one operating Amy, is a professional. (Una aclaración.)

2. Cleft Clauses

It was in June we got married.

3. Anticipatory

It is likely that we stay at home.

4. Prop (Dummy Pronoun)

It pero impersonal.

5. Referential

Where is my coat? Ah, there it is.

6. Existential/Non-existential

The bear is there / There happens to exist the possibility.

7. Indirect Object

Give him the book. (Sólo el him.)

8. Benefactive

Read More

Moroccan Heritage and the Evolution of AI Technology

The Vibrant Charm of Marrakech

Marrakech, often called the “Red City,” is a fascinating and lively destination in Morocco, known for its rich cultural heritage and breathtaking architecture. Located at the foot of the Atlas Mountains, the city offers a mix of tradition and modernity.

The historic medina, a UNESCO World Heritage site, is a maze of narrow streets filled with bustling souks where merchants sell:

  • Handmade crafts
  • Aromatic spices
  • Colorful fabrics

Iconic Landmarks of the Red City

At the heart

Read More

Python String Operators and List Functions Reference

Python String Operators and Operations

Discuss various string operators in Python:

1. Concatenation Operator

The + operator is used to concatenate two or more strings.

Python Code Example:

str1 = "Hello"
str2 = "World"
print(str1 + " " + str2)

Output: Hello World

2. Repetition Operator

The * operator is used to repeat a string a specified number of times.

Python Code Example:

str1 = "Hello"
print(str1 * 3)

Output: HelloHelloHello

3. Indexing Operation ([])

The [] operator is used to access a character at a specified

Read More

Database System Characteristics and Components

Database System Characteristics

The database approach offers several key characteristics that distinguish it from traditional file processing systems:

1. Self-Describing Nature of a Database System

Unlike a file system, where data structure is hardcoded into application programs, a database system contains both the data and its complete definition.

  • Metadata: The description of the database structure, data types, and constraints is stored in the DBMS Catalog (or Data Dictionary).
  • Significance: This allows
Read More