Category: Coding
-
Greedy Algorithm
Author: Gihyun Kim Date: May 23rd, 2024 Topic: The Greedy Algorithm What is the Greedy Algorithm?The greedy algorithm works by selecting the best possible option shown at the given moment regardless of whether it will bring the best possible outcome. This algorithm never returns and fixes the decision that it has made even if the…
-
DFS (Depth First Search) Algorithm
Author: Gihyun Kim Date: April 11th, 2024 Topic: DFS Algorithm and its use What is DFS?DFS, or Depth First Search, is a searching algorithm that is commonly used to traverse a tree or graph data structure. It starts at a specific (randomly chosen) node and goes through the selected path as much as it can…
-
Bitwise Operators
Author: Gihyun Kim Date: March 16th, 2024 Topic: Bitwise Operators & Uses What are Bitwise Operators?Bitwise operators are operators that are able to perform different tasks with the individual components of binary numbers.Here are some examples: bitwise AND: &– Returns 1 if both bits of the binary numbers are 1 but returns 0 otherwise bitwise…
-
Dynamic Programming (DP)
Author: Gihyun Kim Date: January 15th, 2024 Topic: Dynamic Programming (DP) What is Dynamic Programming (DP)?Dynamic Programming (DP) is a programming technique used mainly to improve efficiency by solving complex problems by breaking them down into smaller subquestions and using previously obtained answers and substituting them for the answers of the same/similar questions. DP allows…
-
BFS (Breadth First Search) Algorithm
Author: Gihyun Kim Data: October 15th, 2023 Topic: BFS Algorithm and its use What is BFS?BFS, Breadth First Search, is a searching algorithm that (like DFS) is commonly used to traverse a tree or other data structures such as arrays, arraylists (in java), vectors, or even hashsets. A BFS algorithm starts from a single node…
-
Maze Game

Author: Gihyun Kim Topic: Maize Game Summary:Before school came to an end, in our AP Computer Science A class, we were given an end of year project which was to create a game using the Greenfoot software. I was paired with two other classmates and we assigned roles and sections for us to complete before…
-
Rolling A Dice – Finding all possibilities
Author: Gihyun Kim Date: May 23rd, 2023 Type: Coding Exercise Language: C++ Question: Write a program that receives natural numbers N and M as input and outputs all cases where M can be the sum of the dice rolled N times. Input Format: The number of dice thrown N (2≤N≤8) and the sum of the…
-
Sorting Algorithms
Types: Insertion Sort, Selection sort, and Bubble Sort What Are They?Sorting algorithms are algorithms used to put the elements in a data set (arrays, ArrayLists, vectors, etc.) in order. For example, if an array is in this format: 1 5 3 7 4 2 6 sorting algorithms can sort this array to look like this:…
-
Class Hierarchy
Language: Java Task: Construct a hierarchy of super and sub classes using concepts of polymorphism and inheritance Class hierarchy diagram (constructed by BlueJ) Document to access the Classes (super and sub):https://docs.google.com/document/d/1xVSbdNtInPIMcTkaCbKbxn2g-7AkE2t0q4z1Z84AyTM/edit?usp=sharing Document to access the TesterClass:https://docs.google.com/document/d/1D6uMZqyaYg9VjGxKBZ2jRAV_OxKMS96fePd8gqNwlik/edit?usp=sharing
