Skip to main content

Posts

CST370: Divide and Conquer & Merge Sort

This week, I focused on understanding the Merge Sort algorithm and how the divide and conquer strategy works in practice. From the lecture video, I learned that Merge Sort repeatedly splits an array into two halves until each subarray has only one element, which is already sorted. The key step is the merge operation , where two sorted subarrays are combined by comparing elements and placing them in order. Using the recurrence relation T(n) = 2T(n/2) + Θ(n) and applying the Master Theorem , I learned that the overall time complexity of Merge Sort is Θ(n log n) . This helped me connect the algorithm steps with formal time-complexity analysis. 
Recent posts

Learning Merge Sort and Graph Traversals

This week’s module focused on algorithm design and analysis, with a strong emphasis on divide-and-conquer techniques, especially Merge Sort . From the lecture video captions, I learned how Merge Sort works by repeatedly dividing an array into two halves until each subarray contains only one element. Since a single element is already sorted, the algorithm then focuses on the merge step, where two sorted arrays are combined by comparing elements one at a time. This helped me better understand why Merge Sort is efficient and reliable. I also learned how to analyze Merge Sort using a recurrence relation and apply the Master Theorem to determine its time complexity. By identifying the values of a , b , and f(n) , I was able to see why Merge Sort runs in Θ(n log n) . In addition, the homework and quiz strengthened my understanding of DFS and BFS traversals , including how traversal order and marking rules affect the final result. Topics like the Traveling Salesman Problem , Knapsack Prob...

CST 370 - From loops to Logarithms

This week’s lessons strengthened my understanding of how algorithm efficiency is measured using Big-O, Big-Theta, and Big-Omega notations . The lecture notes emphasized identifying the basic operation and using the dominant term to classify an algorithm’s growth order. Through quizzes, I learned why Big-Theta can only be used when an algorithm has the same time complexity in all cases, while Big-O represents an upper bound. The homework project applied these ideas in practice by showing how sorting often dominates overall runtime, leading to (n log n) complexity. Analyzing recursive algorithms using recurrence relations and backward substitution also helped clarify how time complexity evolves across recursive calls.

Thinking Like an Algorithm in CST 370 This Week

This week, I learned about several important concepts in algorithms and data structures. From the recorded videos, I learned how pseudocode is used to describe algorithms in a clear and language-independent way. I also learned about different problem types , such as sorting, searching, graph problems, and tree data structures. Topics like graphs with vertices and edges, the Traveling Salesman Problem, and trees such as binary trees and binary search trees helped me understand how real-life problems can be modeled using data structures. The quizzes helped reinforce ideas like basic operations, time complexity, stable sorting, and graph properties. One aha moment for me was understanding how binary search trees make searching efficient . By comparing values and choosing to go left or right, the search space becomes smaller very quickly. Another important realization was how sorting can improve searching performance, which explains why these two topics are often discussed together. I al...

Three Most Important Things I Learned in CST363-30: Intro to Database Systems

In CST363-30: Intro to Database Systems , I learned many new concepts that changed the way I think about data and software development. The first important thing I learned was how relational databases like MySQL work. I now understand how to create tables, define primary and foreign keys, and use SQL commands such as SELECT , INSERT , UPDATE , and DELETE to manage data. Learning how to design databases using Entity-Relationship (ER) diagrams and normalization helped me see how organized structures reduce redundancy and improve data accuracy. This part of the course gave me a strong foundation for understanding how information is stored and related inside real business systems. The second major thing I learned was how to connect databases with Java using JDBC . This skill showed me how programming languages interact with databases to build full applications. I practiced writing Java programs that could add, read, or update data in a MySQL database, and I learned how to handle tra...

Choosing Between MongoDB and MySQL

This week I learned more about how MongoDB and MySQL are both powerful tools for managing data, but they serve different purposes. MySQL is a relational database that organizes data into tables with rows and columns. It uses SQL (Structured Query Language) to define and manage data, which makes it very structured and reliable. MongoDB, on the other hand, is a NoSQL database that stores data as documents in a flexible JSON-like format . It does not require a fixed schema, so it is easier to change or add new data types as needed. Both databases are similar because they can handle large amounts of data, support indexing for faster searches, and allow users to perform queries to get specific information. They are also widely used in modern applications and can be connected to programming languages like Java, Python, or C++. However, the key difference is how they store and organize data. MySQL is best when data has clear relationships, such as in school systems, banking, or employee ...

Java Meets MySQL: A Match Made in Code

This week, I learned how to connect a Java program to a MySQL database using JDBC. I practiced creating a connection, inserting new data, selecting records, and managing transactions with commit and rollback. I also learned how to handle SQL exceptions and make the program give clear error messages when something goes wrong, such as duplicate IDs or missing departments. Another important part was understanding how to add the MySQL connector JAR file or dependency in my project so the driver loads correctly. Overall, this week helped me understand how Java interacts with databases and how to make programs that safely read and write data.