top of page
abstract-white-background-with-smooth-lines_476363-333_edited.jpg

    Introduction to basic data structures

    Data structures are ways to organize and store data in a computer so that it can be accessed and                  modified efficiently.

    These basic data structures form the foundation for more complex data handling and manipulation in             computer science, enabling efficient storage and retrieval of data.

 

1. Arrays

  • Description: A collection of elements identified by index or key. All elements are of the same type.

  • Usage: Used for storing fixed-size sequential collections of elements.

  • Example: [1, 2, 3, 4, 5]

2. Linked Lists

  • Description: A linear collection of elements, where each element points to the next. Elements, called nodes, contain data and a reference to the next node.

  • Usage: Used for dynamic memory allocation and scenarios where the size of the collection is unknown.

  • Example: A -> B -> C -> D

3. Stacks

  • Description: A linear data structure following the Last In First Out (LIFO) principle. Elements are added and removed from the top.

  • Usage: Used for tasks like undo functionality, expression evaluation, and function call management.

  • Example: Stack operations like push, pop, and peek.

4. Queues

  • Description: A linear data structure following the First In First Out (FIFO) principle. Elements are added at the rear and removed from the front.

  • Usage: Used for scheduling tasks, managing buffers, and handling requests in a sequential order.

  • Example: Queue operations like enqueue and dequeue.

5. Trees

  • Description: A hierarchical data structure with nodes connected by edges. Each node has a value and children nodes.

  • Usage: Used for representing hierarchical data, such as organizational structures and file systems.

  • Example: Binary Tree, where each node has at most two children (left and right).

6. Graphs

  • Description: A collection of nodes (vertices) connected by edges. Can be directed or undirected.

  • Usage: Used for modeling network structures, such as social networks, transportation systems, and web links.

  • Example: Graph with vertices {A, B, C} and edges {(A,B), (B,C)}.

7. Hash Tables

  • Description: A data structure that maps keys to values for efficient data retrieval. Uses a hash function to compute an index into an array of buckets.

  • Usage: Used for implementing associative arrays, database indexing, and caching.

  • Example: {"apple": 1, "banana": 2, "cherry": 3}

​

     Computer Networks:

 

     A network is a system of interconnected devices and nodes that communicate with each other to share        resources and information. It enables data exchange and resource sharing among multiple computers          and devices, such as printers, servers, and storage systems.

 

    Topology

    Network topology refers to the arrangement of different elements (links, nodes, etc.) in a computer                network.

 

     Bus Topology: All devices share a single communication line (bus). It's simple but can lead to                         congestion.

           Diagram:

           Device 1 -- Bus -- Device 2 -- Bus -- Device 3

     

     Star Topology: All devices are connected to a central hub. Easy to manage, but if the hub fails, the entire       network is affected.

       Diagram:

                Hub

               / | \

        Dev1 Dev2 Dev3

 

     Ring Topology: Devices are connected in a circular fashion. Each device is connected to two other                 devices. Failure of one device can affect the network.

     Diagram:

     Dev1 -- Dev2 -- Dev3 -- Dev1

 

    Mesh Topology: Devices are interconnected. High redundancy and reliability but can be complex and            expensive.

    Diagram:

    Dev1 -- Dev2

      \ | /      \

    Dev3-- Dev4

 

    Hybrid Topology: Combination of two or more topologies to leverage their advantages.

 

    Protocols

    Network protocols are rules and standards that define how data is transmitted over a network. Key               protocols include:

  1. HTTP/HTTPS: HyperText Transfer Protocol (Secure) for web browsing.

  2. FTP: File Transfer Protocol for transferring files between computers.

  3. SMTP/POP3/IMAP: Simple Mail Transfer Protocol, Post Office Protocol, Internet Message Access Protocol for email communication.

  4. TCP/IP: Transmission Control Protocol/Internet Protocol, the foundational protocol suite for the internet.

  5. DNS: Domain Name System, translates domain names to IP addresses.

   

   Network Layers

    The OSI Model (Open Systems Interconnection) is a conceptual framework that standardizes the                   functions of a network into seven layers:

  1. Physical Layer: Transmits raw bit streams over a physical medium (e.g., cables, switches).

  2. Data Link Layer: Handles node-to-node data transfer and error detection (e.g., Ethernet).

  3. Network Layer: Manages packet forwarding, including routing through routers (e.g., IP).

  4. Transport Layer: Ensures complete data transfer with error recovery (e.g., TCP).

  5. Session Layer: Manages sessions between applications (e.g., establishing, maintaining, and terminating connections).

  6. Presentation Layer: Translates data between the application and network formats (e.g., encryption, data compression).

  7. Application Layer: Provides network services to end-users (e.g., HTTP, FTP, email protocols).

footer for home page for engineering study material, notes and sample question paper
Tell us

Thanks for sharing your feedback with us!

  • Instagram
  • YouTube
bottom of page