Skip to main content

Problem Solving

note

Please follow the guide in Chapter 2 (Programming) and then start Chapter 1

Flowcharts

Flowcharts using Chat-GPT
  • Follow this video to learn how to use chatgpt to draw flowcharts for you:

Pseudocode

  • I strongly suggest you to first learn some basic Python (in chapter 2), and then come to this section.

  • Practice some questions on your own:

    • Write pseudocode to calculate the average of three numbers.
    • Create pseudocode to find the maximum of two numbers.
    • Write pseudocode to determine if a given number is even or odd.
    • Develop pseudocode to calculate the factorial of a given number.
    • Create pseudocode to check if a given year is a leap year or not.

Algorithms

Before getting started in this part, i strongly suggest you to watch this video: You can ignore all the "C" code, and data types like 'struct' related to it. But watching this video will help you understand all the concepts required. Just ignore the coding parts as we will be doing it in python.

For each and every algorithm mentioned below, please also refer to the Flowcharts given in the textbook

Bubble Sort

Marge Sort

Visualize and get a basic idea here:

Learn to do it with python: (optional)

What is Bruteforce?

  • basically, trying out every possible combination

Decomposition and Abstraction

Just remember the definitions and stuff. You'll be able to do it flawlessly after following the guide for Chapter 2