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:

    1. Understand how a human solves a problem.

    2. Understand how to translate that human solution into a format a computer can comprehend.

    3. 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:


Problem Solving Steps
  • 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

    1. Pseudocode

    2. 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 num1\text{num1}, num2\text{num2}, and sum\text{sum}.

    • Step 3: Read values num1\text{num1} and num2\text{num2}.

    • Step 4: Add num1\text{num1} and num2\text{num2} and assign the result to sum\text{sum}:       sum=num1+num2\text{sum} = \text{num1} + \text{num2}

    • Step 5: Display sum\text{sum}

    • Step 6: Stop

    • Algorithm 3: Average of Three Numbers

    • Step 1: Start

    • Step 2: Declare variables num1\text{num1}, num2\text{num2}, num3\text{num3}, and avg\text{avg}.

    • Step 3: Read values num1\text{num1}, num2\text{num2}, and num3\text{num3}.

    • Step 4: Apply formula {Average=Sum/No. of values}\{\text{Average} = \text{Sum} / \text{No. of values}\}:       avg=(num1+num2+num3)/3\text{avg} = (\text{num1} + \text{num2} + \text{num3}) / 3

    • Step 5: Display avg\text{avg}

    • Step 6: Stop

    • Algorithm 4: Volume of a Box

    • Step 1: Start

    • Step 2: Declare variables length\text{length}, width\text{width}, height\text{height}, and volume\text{volume}.

    • Step 3: Read values length\text{length}, width\text{width}, and height\text{height}.

    • Step 4: Apply formula {Volume=length×width×height}\{\text{Volume} = \text{length} \times \text{width} \times \text{height}\}:       volume=length×width×height\text{volume} = \text{length} \times \text{width} \times \text{height}

    • Step 5: Display volume\text{volume}

    • Step 6: Stop

    • Algorithm 5: Percent Calculation

    • Step 1: Start

    • Step 2: Declare variables part\text{part}, total\text{total}, and percentage\text{percentage}.

    • Step 3: Read values part\text{part} and total\text{total}.

    • Step 4: Apply formula {Percentage=(part/total)×100}\{\text{Percentage} = (\text{part} / \text{total}) \times 100\}:       percentage=(part/total)×100\text{percentage} = (\text{part} / \text{total}) \times 100

    • Step 5: Display percentage\text{percentage}

    • 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:

    1. Start

    2. Input values xx, yy, zz

    3. Calculate Sum=x+y+z\text{Sum} = x + y + z

    4. Calculate Percent=Sum/300×100\text{Percent} = \text{Sum} / 300 \times 100

    5. Decision: Is percent>70\text{percent} > 70?

      • If Yes: Print "Well done"

      • If No: Print "Work hard"

    6. Stop


Sample Flowchart Diagram
  • 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.


Stack Data Structure
  • 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.


Tree Data Structure Diagram
  • 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:

      1. 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).

      2. 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:

  1. 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: B

  2. What is considered the fundamental core feature of computers?
    A) Media playback
    B) Problem solving
    C) Internet browsing
    D) Data deletion
    Answer: B

  3. Why 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: B

  4. Who 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: C

  5. What 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: B

  6. What 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: C

  7. What 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: A

  8. What 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: B

  9. In 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: B

  10. How 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: B

  11. A 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: B

  12. What 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: B

  13. Why 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: A

  14. What 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: B

  15. On 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: B

  16. Which 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: B

  17. A 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: B

  18. What 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: B

  19. What 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: A

  20. How many basic steps are involved in the structured problem-solving process?
    A) Two
    B) Three
    C) Four
    D) Six
    Answer: C

  21. What 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: B

  22. Which 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: C

  23. In 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: B

  24. Why 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: A

  25. What 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: B

  26. What 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: B

  27. What 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: B

  28. What 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: C

  29. What 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: B

  30. Why 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: B

  31. What 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: C

  32. What 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: A

  33. What 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: A

  34. Which 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: D

  35. When 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: D

  36. What 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: B

  37. For 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: A

  38. Which 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: D

  39. In 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: B

  40. In 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: B

  41. What 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: B

  42. What 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: A

  43. In 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: A

  44. Why 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: A

  45. What 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: B

  46. What 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: B

  47. In 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: B

  48. In Algorithm 2 (Sum of Two Numbers), which variables are declared in Step 2?
    A) xx, yy, and zz
    B) num1\text{num1}, num2\text{num2}, and sum\text{sum}
    C) length\text{length}, width\text{width}, and height\text{height}
    D) part\text{part}, total\text{total}, and percentage\text{percentage}
    Answer: B

  49. In Algorithm 3 (Average of Three Numbers), what formula is applied to compute the average?
    A) avg=num1+num2+num3\text{avg} = \text{num1} + \text{num2} + \text{num3}
    B) avg=(num1+num2+num3)/3\text{avg} = (\text{num1} + \text{num2} + \text{num3}) / 3
    C) avg=(num1×num2×num3)/3\text{avg} = (\text{num1} \times \text{num2} \times \text{num3}) / 3
    D) avg=(num1+num2)/num3\text{avg} = (\text{num1} + \text{num2}) / \text{num3}
    Answer: B

  50. In Algorithm 4 (Volume of a Box), what formula is used to calculate volume?
    A) volume=length+width+height\text{volume} = \text{length} + \text{width} + \text{height}
    B) volume=length×width×height\text{volume} = \text{length} \times \text{width} \times \text{height}
    C) volume=length/(width×height)\text{volume} = \text{length} / (\text{width} \times \text{height})
    D) volume=2×(length+width)\text{volume} = 2 \times (\text{length} + \text{width})
    Answer: B

  51. In Algorithm 5 (Percent Calculation), what formula calculates the percentage?
    A) percentage=(part×total)/100\text{percentage} = (\text{part} \times \text{total}) / 100
    B) percentage=(total/part)×100\text{percentage} = (\text{total} / \text{part}) \times 100
    C) percentage=(part/total)×100\text{percentage} = (\text{part} / \text{total}) \times 100
    D) percentage=part+total×100\text{percentage} = \text{part} + \text{total} \times 100
    Answer: C

  52. What 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: B

  53. What 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: B

  54. What 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: B

  55. What 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: A

  56. What geometric shape represents the Start and Stop (Terminal) in a flowchart?
    A) Rectangle
    B) Parallelogram
    C) Oval
    D) Diamond
    Answer: C

  57. What 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: C

  58. What 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: C

  59. How many arrows typically originate out of a standard Process box (Rectangle)?
    A) Exactly one
    B) Exactly two
    C) Exactly three
    D) Zero
    Answer: A

  60. What shape is used to denote an Input/Output (I/O) operation in a flowchart?
    A) Oval
    B) Parallelogram
    C) Rectangle
    D) Diamond
    Answer: B

  61. What shape represents a Decision or Condition in a flowchart?
    A) Rectangle
    B) Diamond
    C) Oval
    D) Parallelogram
    Answer: B

  62. How 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: B

  63. Which 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: D

  64. In the sample flowchart provided in the study notes, what condition is evaluated?
    A) Sum>100\text{Sum} > 100
    B) Percent>70\text{Percent} > 70
    C) x>yx > y
    D) Percent<50\text{Percent} < 50
    Answer: B

  65. In 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: C

  66. In 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: B

  67. According to the comparison table, which is easier to debug?
    A) Algorithm
    B) Flowchart
    C) Both are equally difficult
    D) Neither can be debugged
    Answer: A

  68. Why 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: A

  69. How 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: A

  70. Which follows specific standardized rules for its geometric construction?
    A) Algorithm
    B) Flowchart
    C) Everyday speech
    D) Pseudocode
    Answer: B

  71. What 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: B

  72. What 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: B

  73. How 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: B

  74. How 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: A

  75. Why 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: A

  76. Which 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: B

  77. Which of the following is a Linear Data Structure?
    A) Tree
    B) Graph
    C) Stack
    D) Binary Tree
    Answer: C

  78. Which 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: B

  79. In 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: C

  80. What 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: B

  81. What term is used to describe the operation of inserting an element into a stack?
    A) Pop
    B) Push
    C) Enqueue
    D) Dequeue
    Answer: B

  82. What term is used to describe the operation of removing an element from a stack?
    A) Push
    B) Pop
    C) Enqueue
    D) Traversal
    Answer: B

  83. What 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: B

  84. What 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: B

  85. What 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: B

  86. In a queue, at which end do deletions (removals) take place?
    A) Rear or Tail
    B) Front or Head
    C) Top
    D) Root
    Answer: B

  87. In a queue, at which end do insertions take place?
    A) Front or Head
    B) Rear or Tail
    C) Top
    D) Center
    Answer: B

  88. What is the process of adding an element to a queue called?
    A) Push
    B) Pop
    C) Enqueue
    D) Dequeue
    Answer: C

  89. What is the process of removing an element from a queue called?
    A) Push
    B) Pop
    C) Enqueue
    D) Dequeue
    Answer: D

  90. What 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: B

  91. How 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: B

  92. How 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: B

  93. Which 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: D

  94. What 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: B

  95. How 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: A

  96. Which of the following is an example of a Non-Linear Data Structure?
    A) Stack
    B) Queue
    C) Array
    D) Tree
    Answer: D

  97. What 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: B

  98. What is the very first node in a tree collection called?
    A) Parent node
    B) Child node
    C) Root node
    D) Leaf node
    Answer: C

  99. In a Binary Tree, what is the maximum number of children each node can have?
    A) One
    B) Two
    C) Three
    D) Unlimited
    Answer: B

  100. In 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