TaleemBay
Study
UniversitiesScholarshipsFeesDates
TaleemBay

Empowering students with Next-Gen tools for a brighter future. Your one-stop destination for education in Pakistan.

Quick Links

  • Universities
  • Study Center
  • Past Papers
  • Date Sheets
  • Results

Support

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service
  • Advertise

Contact Us

  • Arfa Software Technology Park,
    Ferozepur Road, Lahore
  • +92 300 1234567
  • hello@taleembay.com

© 2026 TaleemBay. All rights reserved.

Designed with ❤️ for Pakistan

Home
Unis
Study

Study Center

Overview
9th Class10th Class11th Class12th Class

Resources

Past PapersDate Sheets

Need Notes?

AI-powered search for instant answers.

Chapter 4
computer-science • intermediate 11th

Computational Structures

Comprehensive notes, MCQs, and Short Questions for Chapter 4 Computational Structures. Covers Lists, Stacks, Queues, Trees, and Graphs in Python.

Lists in Python

Definition: A list is a data structure that stores multiple items in a specific sequence. Created using square brackets [].

Properties:
- Dynamic Size: Can grow or shrink.
- Indexed Access: Elements accessed by index (starting at 0).
- Maintains Order: Preserves insertion order.
- Heterogeneous: Can store different data types.
- Mutable: Can be changed after creation.
- Allows Duplicates: Same value can appear multiple times.

List Operations

Insertion:
- append(item): Adds item at the end.
- insert(index, item): Adds item at a specific position.

Deletion:
- remove(item): Removes by value.
- pop(index): Removes by index.

Searching: Use in keyword to check if item exists.

Stack (LIFO)

Definition: A data structure where the last item added is the first one removed (Last-In, First-Out).

Real-life Example: A pile of plates.

Operations:
- Push: Add item to the top (append()).
- Pop: Remove item from the top (pop()).

Queue (FIFO)

Definition: A data structure where the first item added is the first one removed (First-In, First-Out).

Real-life Example: A line at a ticket counter.

Operations:
- Enqueue: Add item to the end (put()).
- Dequeue: Remove item from the front (get()).

Tree Data Structure

Definition: A hierarchical structure with nodes connected by edges. Has one root node and can have many levels.

Key Terms:
- Root: Topmost node.
- Node: Individual element.
- Edge: Connection between nodes.
- Leaf: Node with no children.
- Height: Number of edges from root to deepest node.

Applications: File systems, decision trees, family trees, organization charts.

Graph Data Structure

Definition: A structure showing connections between objects, made of vertices (nodes) and edges (links).

Types:
- Directed Graph: One-way connections.
- Undirected Graph: Two-way connections.
- Weighted Graph: Edges have values (e.g., distance).

Applications: Social networks, city maps, transport systems.

Download PDFPDF