Problem Solving Algorithms Flowcharts and Data Structures Study Notes
Fundamentals of Problem Solving
Problem Solving Definition
Problem solving is the process of finding solutions to difficult or complex issues.
It is the core process by which any kind of problem is solved.
Role of Computers in Problem Solving
Problem solving is the fundamental core feature of computers.
A computer is not naturally intelligent and cannot analyze a problem or generate a solution on its own.
A human (the programmer) must:
Analyze the problem.
Develop specific instructions for solving the problem.
Make the computer carry out those instructions.
The primary responsibility of a programmer is to provide solutions to problems using computer systems.
Steps for computer science learning:
Understand how a human solves a problem.
Understand how to translate that human solution into a format a computer can comprehend.
Write the specific computational steps required to accomplish the task.
Note: In certain scenarios, a machine will solve a problem in a completely different manner than a human.
Definition of a Problem
A problem is defined as a situation that prevents something from being achieved.
It can manifest as a task, a situation, or any other obstacle.
In simple terms, a problem is a question that requires an answer or a solution.
It is generally considered a matter that is difficult to solve or settle, a doubtful case, or a complex task involving doubt and uncertainty.
Planning the Solution
Problems are solved with computer assistance, requiring programmers to carefully plan and strategize tasks leading to a resolution.
Problem-Solving Strategies
A strategy is an approach (or a series of approaches) created specifically to solve a computational problem.
Strategies are designed based on the precise nature of the given problem.
Strategies are flexible and outline various steps required to reach a solution.
A strategy on its own might yield incorrect results, but an algorithm constructed from a valid strategy will always produce correct results.
Strategy creation requires determining what the problem actually is and contrasting it with how the situation should ideally look without the problem.
Asking questions regarding the end result helps identify the existing gap and create an effective solution strategy.
The Four-Step Problem-Solving Process
Problem solving is a structured step-by-step process involving four primary stages:

Step 1: Define the Problem
Defining or identifying the problem is the first, most difficult, and most critical step.
Involves diagnosing the overall situation to ensure focus remains on the root problem rather than merely treating its symptoms.
Requires describing the problem clearly, which helps others understand the exact issue.
Step 2: Generate Alternative Solutions
Every problem generally has multiple solutions beyond the first idea that comes to mind.
Postpone selecting a single final solution until several alternative approaches have been proposed.
Evaluating multiple alternatives significantly increases the value of the ultimate ideal solution.
Develop a thorough list of all feasible options for subsequent assessment.
Useful tools during this phase include critical thinking techniques and team problem-solving methodologies.
Step 3: Evaluate and Select an Alternative
A common error in problem solving is evaluating alternatives as soon as they are proposed, leading to the selection of the first acceptable option even if it is suboptimal.
premature selection prevents teams from learning new insights necessary for genuine, long-term process improvement.
Evaluate all proposed alternatives thoroughly prior to final selection.
Step 4: Implement and Follow Up on the Solution
Solution plans must include contingency strategies specifying what actions to take if something goes wrong or if results do not meet expectations.
Once implemented, track and measure real-world performance to answer:
Did the solution work?
Was it a good solution?
Were lessons learned that can be applied to future problems?
Considerations for choosing the best solution:
Does it solve the current problem without creating new issues?
Is it acceptable to all stakeholders involved?
Is it achievable within budget constraints and specified timeframes?
Algorithms in Problem Solving
Applications of Algorithms in Information Technology (IT)
Algorithms are used across all domains of IT.
Search Engine Example: Accepts search strings of keywords and operators as input, queries an associated database for relevant pages, and returns organized results.
Online Advertising Example: Accepts input data such as age, gender, geographic region, and user interests, displaying advertisements exclusively to matching user profiles.
Definition of an Algorithm
An algorithm is a structured set of instructions, steps, or rules followed to complete a problem-solving task.
It serves as a precise tool for solving well-specified computational problems.
Everyday Examples of Algorithms
Morning routines followed after waking up.
Following step-by-step driving instructions to reach a destination.
Following recipes while cooking meals or preparing tea.
Methods to Express Algorithm Designs
Pseudocode
Flowcharts
Role of Algorithms in Problem Solving
Ensures exact, predictable, and optimal results every single time it executes.
Highly valuable when high accuracy is required or when recurring problems must be solved repeatedly.
Forms the base logic for software programs, executing inputs to compute required outputs.
Programmers design algorithms for diverse functions ranging from user data retrieval to complex formula computations.
Formatted output data is presented to users in a meaningful structure to enable informed decision-making.
Qualities of Good Algorithms
Precision: Inputs and outputs must be clearly and precisely defined.
Unambiguous Steps: Every individual step must be unambiguous and clear in intention.
Efficiency: Represents the most effective path among alternative problem-solving routes.
Language-Agnostic: Must NOT include language-specific computer code; written universally so it can be implemented across various programming languages.
Detailed Algorithm Examples
Algorithm 1: Making a Cup of Tea
Step 1: Start
Step 2: Place fresh water in a pot or kettle.
Step 3: Boil the water.
Step 4: Add black tea leaves into the pot.
Step 5: Add milk into the pot.
Step 6: Add sugar.
Step 7: Boil for some time.
Step 8: Stop
Algorithm 2: Sum of Two Numbers
Step 1: Start
Step 2: Declare variables , , and .
Step 3: Read values and .
Step 4: Add and and assign the result to :
Step 5: Display
Step 6: Stop
Algorithm 3: Average of Three Numbers
Step 1: Start
Step 2: Declare variables , , , and .
Step 3: Read values , , and .
Step 4: Apply formula :
Step 5: Display
Step 6: Stop
Algorithm 4: Volume of a Box
Step 1: Start
Step 2: Declare variables , , , and .
Step 3: Read values , , and .
Step 4: Apply formula :
Step 5: Display
Step 6: Stop
Algorithm 5: Percent Calculation
Step 1: Start
Step 2: Declare variables , , and .
Step 3: Read values and .
Step 4: Apply formula :
Step 5: Display
Step 6: Stop
Flowcharts
Definition and Overview
A flowchart is a diagrammatic/graphical physical representation of the problem-solving process.
Illustrates the explicit sequence of steps and operational logic prior to writing program code.
Serves as a general-purpose communication tool using standard geometric symbols connected by directed lines or arrows showing procedural flow.
Types of Flowcharts
Information System Flowcharts: Display the overarching flow of data from raw source documents through to final distribution to users.
Program Flowcharts: Display the specific sequence of instructions or logical steps within a single program or subroutine.
Standard Flowchart Symbols
Start/Stop (Terminal)
Shape: Oval
Description: Represents the explicit start and end points of a program or flowchart sequence.
Arrows (Flowlines)
Shape: Directed Arrow
Description: Indicates the exact direction of process flow from one step or symbol to another.
Process
Shape: Rectangle
Description: Indicates internal processing operations or calculations (typically a single operational step). Contains text inside the rectangle; exactly one arrow originates out from it.
Input/Output (I/O)
Shape: Parallelogram
Description: Denotes any input or output operation where the system receives data or presents calculated output results.
Decision / Condition
Shape: Diamond
Description: Displays a conditional evaluation step written within the diamond. Features two exit arrows pointing to distinct branches based on evaluation (True/False or Yes/No).
Importance and Advantages of Flowcharts
Provides instant visual representation of logic that can be comprehended in a single glance.
Simplifies communication of program logic to clients and non-technical stakeholders.
Acts as primary program documentation for software maintenance, expansion, and logic updates.
Serves as an architectural blueprint during actual programming and code implementation.
Sample Flowchart Logic Execution
Task: Reads three numbers, computes sum and percentage, and outputs performance criteria.
Process Steps:
Start
Input values , ,
Calculate
Calculate
Decision: Is ?
If Yes: Print "Well done"
If No: Print "Work hard"
Stop

Detailed Comparison: Algorithm vs. Flowchart
Format
Algorithm: Textual step-by-step description.
Flowchart: Diagrammatic visual representation using geometric shapes.
Representation
Algorithm: Text-based pseudocode.
Flowchart: Visual symbols and directed flow lines.
Debugging
Algorithm: Easier to debug logical text errors.
Flowchart: More difficult to debug complex graphical layouts.
Construction and Comprehension
Algorithm: Can be more difficult to construct and read as complexity grows.
Flowchart: Easy to construct visually and quick to understand.
Rule Adherence
Algorithm: Flexible; does not follow rigid syntax rules.
Flowchart: Strict compliance with specific symbol usage rules.
Data Structures
Definition of Data Structure
A data structure is a specialized scheme for organizing and storing data in a computer so that it can be utilized efficiently.
Data structures are categorized into Linear Data Structures and Non-Linear Data Structures.
Linear Data Structures
Elements are arranged sequentially in a continuous single-level line.
Each element connects directly to its adjacent previous and next elements.
Allows linear traversal in a single execution run.
Simple to implement because physical computer memory is organized sequentially.
Less efficient in terms of overall memory utilization.
Main Examples: Stack, Queue, Array.
Stack
A linear structure adhering to LIFO (Last In First Out) or FILO (First In Last Out) execution order.
Data added last is removed first; data added first is removed last.
Access is restricted strictly to the top of the stack; elements cannot be inserted or removed from the middle or bottom.
Real-world Metaphor: A stack of cafeteria plates where the topmost plate is removed first and the bottom plate remains until all others are removed.
Terminology & Operations:
Push: Operation to insert an element onto the top of the stack.
Pop: Operation to remove an element from the top of the stack.
Overflow State: Occurs when attempting to push onto a completely full stack.
Underflow State: Occurs when attempting to pop from an entirely empty stack.

Queue
A linear structure adhering to FIFO (First In First Out) execution order.
The element inserted first is processed and removed first.
Real-world Metaphor: A line of students waiting at school or patrons at a cinema ticket counter.
Structural Terminology & Operations:
Front / Head: The designated exit end where deletions take place.
Rear / Tail: The designated entry end where new insertions take place.
Enqueue: The process of adding a new element to the rear of the queue.
Dequeue: The process of removing an element from the front of the queue.
Element Ordering Constraint: Newly inserted items cannot be removed until all preceding elements in line have been dequeued.
Array
A linear data structure that holds a finite, ordered collection of homogeneous elements (all of the exact same data type).
Elements are stored in contiguous, successive memory addresses.
Core Definitions:
Element: Each individual value stored within the array.
Index: A unique, consecutive numerical identifier that references the specific location of an element.
Common Operations Performed on Arrays:
Traversal
Search
Insertion
Deletion
Sorting
Non-Linear Data Structures
Elements are not connected in sequential order.
Individual elements can connect to multiple adjacent nodes along diverse computational paths.
Supports multi-level hierarchical structures.
Cannot be traversed entirely in a single run.
Implementation is complex, but memory utilization efficiency is vastly superior compared to linear structures.
Main Examples: Trees, Graphs.
Tree
Represents data organized in explicit hierarchical relationships.
Elements are represented as nodes connected visually by edges.
Core Components:
Root Node: The primary top node that serves as the entry point for the structure.
Parent Node: A node that connects downward to lower-level nodes.
Child Node: A node connected beneath a parent node.
Binary Tree / Binary Search Tree: A specialized tree structure where every node has a maximum limit of two child nodes.

Graph
A non-linear data structure consisting of a finite set of vertices (nodes) linked together by edges (connecting lines).
Nodes store record data (e.g., student roll numbers, names, marks) and can connect to any arbitrary number of edges.
Graphs do not feature a central root node or hierarchical parent-child relationships; cycles can freely form.
Real-World Network Applications:
Telephone communications systems.
Social media networks (e.g., Facebook, where individual profiles are nodes and friend connections represent edges).
Primary Categories of Graphs:
Undirected Graph: Edges are entirely bidirectional. Traversals between connected nodes can occur in both directions (from node 1 to 2, and from node 2 to 1).
Directed Graph: Edges feature directionality indicated by arrowheads. Traversals can only occur strictly in the designated arrow direction (e.g., node 1 to node 2, but not reverse).
Here is a comprehensive set of 100 multiple-choice questions based directly on your study notes and sources:
What is problem solving defined as?
A) Writing computer code
B) The process of finding solutions to difficult or complex issues
C) Designing hardware circuits
D) Translating assembly language
Answer: BWhat is considered the fundamental core feature of computers?
A) Media playback
B) Problem solving
C) Internet browsing
D) Data deletion
Answer: BWhy can't a computer analyze a problem or generate a solution on its own?
A) It lacks storage capacity
B) It is not naturally intelligent
C) It has limited power supply
D) Its clock cycle is too slow
Answer: BWho is responsible for analyzing a problem and developing instructions for the computer?
A) The end user
B) The network administrator
C) A human (the programmer)
D) The computer compiler
Answer: CWhat is the primary responsibility of a programmer?
A) Manufacturing electronic components
B) Providing solutions to problems using computer systems
C) Marketing software products
D) Managing hardware assembly
Answer: BWhat is the first step for students learning computer science problem solving?
A) Translate human solutions for a machine
B) Write specific computational steps
C) Understand how a human solves a problem
D) Select a high-level programming language
Answer: CWhat is the second step for computer science students in problem solving?
A) Understand how to translate the human solution into a format a computer can comprehend
B) Purchase development software
C) Draw a physical flowchart
D) Execute automated testing
Answer: AWhat is the third step for computer science students in problem solving?
A) Define the problem scope
B) Write the specific computational steps required to accomplish the task
C) Brainstorm team alternatives
D) Purchase a compiler
Answer: BIn certain scenarios, how does a machine solve a problem compared to a human?
A) Exactly identically
B) In a completely different manner
C) Never correctly
D) Without any operational steps
Answer: BHow is a problem defined in simple terms?
A) An error in computer syntax
B) A question that requires an answer or a solution
C) A compromised database
D) An incomplete subroutine
Answer: BA problem is defined as a situation that prevents what?
A) Code compilation
B) Something from being achieved
C) Hardware from operating
D) Variables from clearing
Answer: BWhat can a problem manifest as?
A) Only an algorithm
B) A task, a situation, or any obstacle
C) Only a syntax error
D) A flowchart connector
Answer: BWhy must programmers plan and strategize tasks when solving problems with computers?
A) Computers require human guidance and instructions to reach a resolution
B) Computers have natural problem-solving cognition
C) Computers can strategize independently
D) Computers refuse to execute without a graphical diagram
Answer: AWhat is a problem-solving strategy?
A) A programming language
B) An approach or series of approaches created specifically to solve a computational problem
C) A computer physical component
D) A standard flowchart symbol
Answer: BOn what basis are problem-solving strategies designed?
A) The brand of the computer
B) The precise nature of the given problem
C) The speed of the processor
D) The operating system type
Answer: BWhich statement is true regarding problem-solving strategies?
A) They are rigid and unchangeable
B) They are flexible and outline steps to reach a solution
C) They always guarantee bug-free code on their own
D) They replace algorithms entirely
Answer: BA strategy on its own might yield incorrect results, but what will an algorithm based on a valid strategy produce?
A) Inconsistent results
B) Always correct results
C) Unpredictable outputs
D) Immediate compiler warnings
Answer: BWhat does creating a strategy require contrasting?
A) Flowcharts with binary trees
B) What the problem actually is with how the situation should ideally look without the problem
C) Hardware specifications with memory
D) Stacks with queues
Answer: BWhat helps identify the existing gap and create an effective solution strategy?
A) Asking questions regarding the end result
B) Writing program code immediately
C) Buying additional computer storage
D) Running a virus scan
Answer: AHow many basic steps are involved in the structured problem-solving process?
A) Two
B) Three
C) Four
D) Six
Answer: CWhat is the first step in the four-step problem-solving process?
A) Generate alternative solutions
B) Define the problem
C) Choose a solution
D) Implement the solution
Answer: BWhich step is considered the most difficult and most important in problem solving?
A) Implementing the solution
B) Evaluating alternatives
C) Defining or identifying the problem
D) Coding the algorithm in pseudocode
Answer: CIn defining the problem, what should the focus strictly be on?
A) The symptoms only
B) The real problem and not on its symptoms
C) The target programming language
D) The hardware requirements
Answer: BWhy is thoroughly describing the problem during the first stage beneficial?
A) It helps others understand the problem
B) It eliminates the need for an algorithm
C) It bypasses testing
D) It guarantees zero memory usage
Answer: AWhat is the second step in the problem-solving process?
A) Define the problem
B) Generate alternative solutions
C) Evaluate and select an alternative
D) Implement and follow up on the solution
Answer: BWhat should a problem solver do before selecting a definitive solution?
A) Implement the first idea immediately
B) Postpone selection until several alternatives have been proposed
C) Write program code directly
D) Ignore alternative viewpoints
Answer: BWhat are useful tools during the alternative solution generation stage?
A) Compilers and interpreters
B) Thinking and team problem-solving techniques
C) Sorting algorithms
D) Debugging software
Answer: BWhat is the third step of the problem-solving process?
A) Define the problem
B) Generate alternative solutions
C) Evaluate and select an alternative
D) Follow up on the solution
Answer: CWhat is a common mistake made during problem solving?
A) Proposing multiple alternatives
B) Evaluating alternatives as they are proposed and selecting the first acceptable one
C) Using flowcharts for visualization
D) Asking questions about the end result
Answer: BWhy is evaluating alternatives prematurely detrimental?
A) It causes system crashes
B) It can cause solvers to miss chances for learning something new required for real improvement
C) It makes the algorithm language-agnostic
D) It violates LIFO rules
Answer: BWhat is the fourth step of the problem-solving process?
A) Define the problem
B) Generate alternatives
C) Implement and follow up on the solution
D) Select an alternative
Answer: CWhat should a comprehensive implementation plan include in case something goes wrong?
A) Planning what happens next if the solution does not work out as required
B) Discarding all research
C) Ignoring stakeholder feedback
D) Switching immediately to random guessing
Answer: AWhat is critical to do after implementing the chosen solution?
A) Track and measure the results
B) Delete project documentation
C) Redefine the fundamental problem
D) Disregard follow-up questions
Answer: AWhich of the following is an essential follow-up question when evaluating an implemented solution?
A) Did it work?
B) Was this a good solution?
C) Did we learn something here that we could apply to other potential problems?
D) All of the above
Answer: DWhen selecting an appropriate solution, what practical impacts should be considered?
A) Whether the solution solves the problem without creating new ones
B) Whether it is acceptable to everyone involved
C) Whether it is within budget and achievable in the given time
D) All of the above
Answer: DWhat is the definition of an algorithm?
A) A physical piece of computer processing equipment
B) A structured set of instructions, steps, or rules followed to solve a problem
C) A specialized non-volatile storage chip
D) An operating system interface
Answer: BFor what kind of problems does an algorithm serve as a precise tool?
A) Well-specified computational problems
B) Subjective artistic problems
C) Mechanical hardware errors only
D) Completely undefined tasks
Answer: AWhich of the following is an everyday example of an algorithm?
A) A morning routine followed after waking up
B) Step-by-step driving directions to reach a destination
C) Following a recipe when cooking food or preparing tea
D) All of the above
Answer: DIn a search engine algorithm, what serves as the input?
A) Web page indexes
B) Search strings of keywords and operators
C) Server hardware logs
D) Operating system registry files
Answer: BIn an online advertising algorithm, what user data is typically taken as input?
A) CPU clock speed and monitor resolution
B) Age, gender, geographic region, and user interests
C) Keyboard layouts
D) Power consumption
Answer: BWhat are the two common methods used to express algorithm designs?
A) Binary code and assembly code
B) Pseudocode and flowcharts
C) Stacks and queues
D) Compilers and interpreters
Answer: BWhat is a primary role and advantage of using an algorithm in problem solving?
A) It produces the best possible and predictable answer every time it executes
B) It removes the requirement for computer memory
C) It changes logical operations randomly
D) It can only execute on mainframe computers
Answer: AIn which scenario is an algorithm particularly valuable?
A) When high accuracy is required or when recurring problems must be solved repeatedly
B) When unpredictable, random answers are desired
C) When no logical steps can be formulated
D) When hardware is non-functional
Answer: AWhy must inputs and outputs of a good algorithm be defined precisely?
A) To ensure precision and clarity in problem resolution
B) To force execution in a specific programming language
C) To decrease computer display brightness
D) To prevent data structures from using memory
Answer: AWhat does the quality of 'unambiguous steps' mean in an algorithm?
A) Steps must be written in machine language
B) Every individual step must be clear and have a single definite intention
C) Each step must allow multiple random paths
D) Steps are open to interpretation by hardware
Answer: BWhat does it mean for an algorithm to be 'language-agnostic'?
A) It is written in binary notation only
B) It should not include language-specific code and can be implemented across different programming languages
C) It cannot be translated into human language
D) It runs without any translation
Answer: BIn Algorithm 1 (Making a Cup of Tea), what is Step 4?
A) Add milk
B) Put black tea leaves into the pot
C) Add sugar
D) Boil the water
Answer: BIn Algorithm 2 (Sum of Two Numbers), which variables are declared in Step 2?
A) , , and
B) , , and
C) , , and
D) , , and
Answer: BIn Algorithm 3 (Average of Three Numbers), what formula is applied to compute the average?
A)
B)
C)
D)
Answer: BIn Algorithm 4 (Volume of a Box), what formula is used to calculate volume?
A)
B)
C)
D)
Answer: BIn Algorithm 5 (Percent Calculation), what formula calculates the percentage?
A)
B)
C)
D)
Answer: CWhat is a flowchart?
A) A physical hardware diagnostic diagram
B) A diagrammatic or graphical physical representation of the problem-solving process
C) An assembly language instruction set
D) A linear data storage structure
Answer: BWhat does a flowchart illustrate before writing computer program code?
A) Hardware manufacturing costs
B) The sequence of steps and operational logic of the solution
C) Memory chip allocation addresses
D) Network bandwidth consumption
Answer: BWhat do Information System Flowcharts primarily display?
A) Machine code execution inside registers
B) The overarching flow of data from raw source documents through to final distribution to users
C) Logic of an individual loop in a subroutine
D) Physical circuit traces on a motherboard
Answer: BWhat do Program Flowcharts display?
A) The sequence of steps or instructions within a single program or subroutine
B) Company corporate organizational structures
C) Global internet routing paths
D) Office building cable distribution
Answer: AWhat geometric shape represents the Start and Stop (Terminal) in a flowchart?
A) Rectangle
B) Parallelogram
C) Oval
D) Diamond
Answer: CWhat symbol in a flowchart indicates the direction of process flow from one step to another?
A) Oval
B) Rectangle
C) Directed Arrow (Flowline)
D) Diamond
Answer: CWhat does a Rectangle shape indicate in a flowchart?
A) Explicit terminal points
B) Conditional decisions
C) Internal processing operations or calculations
D) Input/Output operations
Answer: CHow many arrows typically originate out of a standard Process box (Rectangle)?
A) Exactly one
B) Exactly two
C) Exactly three
D) Zero
Answer: AWhat shape is used to denote an Input/Output (I/O) operation in a flowchart?
A) Oval
B) Parallelogram
C) Rectangle
D) Diamond
Answer: BWhat shape represents a Decision or Condition in a flowchart?
A) Rectangle
B) Diamond
C) Oval
D) Parallelogram
Answer: BHow many exit arrows originate from a Decision (Diamond) symbol in a flowchart?
A) One
B) Two (directing toward True/False or Yes/No)
C) Three
D) Four
Answer: BWhich of the following is an advantage of flowcharts?
A) Provides an instant visual representation easy to comprehend in one look
B) Simplifies communication of program logic to clients and non-technical stakeholders
C) Serves as a guide or architectural blueprint during program coding
D) All of the above
Answer: DIn the sample flowchart provided in the study notes, what condition is evaluated?
A)
B)
C)
D)
Answer: BIn the sample flowchart, what is printed if the condition 'percent > 70' evaluates to Yes (True)?
A) \"Work hard\"
B) \"Pass\"
C) \"Well done\"
D) \"Excellent\"
Answer: CIn the sample flowchart, what is printed if 'percent > 70' evaluates to No (False)?
A) \"Well done\"
B) \"Work hard\"
C) \"Fail\"
D) \"Try again\"
Answer: BAccording to the comparison table, which is easier to debug?
A) Algorithm
B) Flowchart
C) Both are equally difficult
D) Neither can be debugged
Answer: AWhy is a flowchart considered difficult to debug compared to an algorithm?
A) It is expressed visually with shapes and branching lines
B) It contains no operational logic
C) It cannot be written down
D) It lacks start and stop symbols
Answer: AHow do algorithms and flowcharts differ in how they are constructed?
A) Text is used in an algorithm; symbols or shapes are used in a flowchart
B) Symbols are used in an algorithm; text is used in a flowchart
C) Algorithms use binary code; flowcharts use assembly code
D) Flowcharts use plain sentences; algorithms use geometric drawings
Answer: AWhich follows specific standardized rules for its geometric construction?
A) Algorithm
B) Flowchart
C) Everyday speech
D) Pseudocode
Answer: BWhat is a data structure?
A) A physical computer chassis
B) A specialized scheme for organizing and storing data in a computer so that it can be used efficiently
C) A communication network protocol
D) A CPU instruction decoder
Answer: BWhat are the two major classifications of data structures?
A) Primary and Secondary
B) Linear and Non-Linear
C) Static and Volatile
D) Internal and External
Answer: BHow are elements organized in a Linear Data Structure?
A) In a multi-level hierarchical tree
B) In sequential order where each element is connected to its previous and next elements
C) In an arbitrary network of nodes
D) In non-sequential clusters
Answer: BHow can a linear data structure be traversed?
A) In a single level and in a single execution run
B) Only through multi-level traversal
C) Only backwards
D) By random jump points only
Answer: AWhy are linear data structures easy to implement in physical computers?
A) Computer memory is physically organized in a sequential form
B) They do not require any memory allocation
C) They have infinite capacity
D) They do not require indexing
Answer: AWhich of the following is a drawback of linear data structures?
A) They are difficult to understand
B) They are not efficient in memory utilization
C) They cannot be traversed
D) They cannot store homogeneous data types
Answer: BWhich of the following is a Linear Data Structure?
A) Tree
B) Graph
C) Stack
D) Binary Tree
Answer: CWhich execution order does a Stack follow?
A) FIFO (First In First Out)
B) LIFO (Last In First Out) or FILO (First In Last Out)
C) Random Access
D) Priority Order
Answer: BIn a stack, where can elements be inserted or removed?
A) At the bottom
B) In the middle
C) Strictly at the top
D) At either end
Answer: CWhat real-world metaphor is used to illustrate a stack?
A) Students standing in a school ticket line
B) Plates stacked over one another in a canteen
C) A family genealogical tree
D) A telephone connection network
Answer: BWhat term is used to describe the operation of inserting an element into a stack?
A) Pop
B) Push
C) Enqueue
D) Dequeue
Answer: BWhat term is used to describe the operation of removing an element from a stack?
A) Push
B) Pop
C) Enqueue
D) Traversal
Answer: BWhat state is a stack in when it is completely full and an insertion is attempted?
A) Underflow state
B) Overflow state
C) Empty state
D) Null state
Answer: BWhat state is a stack in when it is completely empty and a removal is attempted?
A) Overflow state
B) Underflow state
C) Traversal state
D) Peak state
Answer: BWhat order of operations does a Queue follow?
A) LIFO (Last In First Out)
B) FIFO (First In First Out)
C) FILO (First In Last Out)
D) Multi-level order
Answer: BIn a queue, at which end do deletions (removals) take place?
A) Rear or Tail
B) Front or Head
C) Top
D) Root
Answer: BIn a queue, at which end do insertions take place?
A) Front or Head
B) Rear or Tail
C) Top
D) Center
Answer: BWhat is the process of adding an element to a queue called?
A) Push
B) Pop
C) Enqueue
D) Dequeue
Answer: CWhat is the process of removing an element from a queue called?
A) Push
B) Pop
C) Enqueue
D) Dequeue
Answer: DWhat is an Array?
A) A non-linear hierarchical collection of data
B) A linear data structure holding a list of finite data elements of the same data type
C) A dynamic network of vertices and edges
D) A LIFO storage buffer
Answer: BHow are elements of an array stored in physical computer memory?
A) In scattered, non-consecutive locations
B) In successive (contiguous) memory locations
C) In different storage partitions
D) Only in cache registers
Answer: BHow is each location of an element in an array identified?
A) By an Edge identifier
B) By an index consisting of consecutive numbers
C) By a hash key
D) By a binary code pointer
Answer: BWhich operations can be performed on an array data structure?
A) Traversal and Search
B) Insertion and Deletion
C) Sorting
D) All of the above
Answer: DWhat is a key characteristic of Non-Linear Data Structures?
A) Elements are connected in a single sequential line
B) Elements are not connected in a sequence and can have multiple paths to connect to other elements
C) They can always be traversed in a single execution run
D) Physical implementation is simpler than linear structures
Answer: BHow do non-linear data structures compare to linear structures in terms of memory utilization?
A) Non-linear structures are more efficient in utilizing computer memory
B) Non-linear structures are less efficient in utilizing memory
C) Both utilize memory identically
D) Non-linear structures require zero memory
Answer: AWhich of the following is an example of a Non-Linear Data Structure?
A) Stack
B) Queue
C) Array
D) Tree
Answer: DWhat type of relationship between elements is represented by a Tree data structure?
A) Linear sequential relationship
B) Hierarchical relationship
C) First-in first-out relationship
D) Bidirectional cyclic relationship
Answer: BWhat is the very first node in a tree collection called?
A) Parent node
B) Child node
C) Root node
D) Leaf node
Answer: CIn a Binary Tree, what is the maximum number of children each node can have?
A) One
B) Two
C) Three
D) Unlimited
Answer: BIn an undirected graph, how are nodes connected by edges?
A) By edges that only go in one direction
B) By edges that are all bidirectional
C) Only through a root node
D) By arrows pointing exclusively toward child nodes
Answer: B