Merge Sort

Merge Sort Merge Sort is a divide-and-conquer algorithm that divides the input list into two halves, recursively sorts the halves, and then merges the sorted halves. This algorithm is efficient for larger lists and is a stable sorting algorithm that guarantees $O(n \log n)$ time complexity. Key Points Time Complexity: $O(n \log n)$ Space Complexity: $O(n)$ Process: Divide: The input list is divided into two halves Conquer: The two halves are recursively sorted Merge: The sorted halves are merged back together in sorted order Features:...

June 2, 2024 · 3 min · 531 words · Xavier Loera Flores

Bubble Sort

Bubble Sort Bubble Sort is a simple sorting algorithm which repeatedly compares and swaps adjacent elements in place. By swapping elements into the correct order, larger elements will be bubbled towards the end of the list. Effectively, the algorithm bubbles the current largest element to the end of the list in each phase of the algorithm. Although this algorithm is simple, it is not efficient for larger lists. Key Points Time Complexity: $O({n}^{2})$...

June 1, 2024 · 2 min · 380 words · Xavier Loera Flores

API Documentation

API Documentation Whether writing API documentation for a Web API or a Platform API, good API documentation will usually contain two key major components: Overview Reference Overview The overview section is best used to explain why or how an API should be used. This is section for providing developers with information allowing them to quickly read steps to getting started, key concepts, and other sample tutorials and use cases. The following sections may be found in an Overview section:...

May 31, 2024 · 1 min · 142 words · Xavier Loera Flores

Theory of Computation & Computational Models

When solving problems in computer science, it can help to abstract the problem to gain a better understanding of what we can possibly achieve. This can especially be seen when analyzing algorithms since we usually care more about how algorithms would perform on abstract computers (machines) rather than specific hardware. Computation any type of calculation that may include both arithmetical & non-arithmetical steps to provide a solution to a problem. Computational Models abstract models that allow us to reason about what can and can’t possibly be computed by a particular device....

November 27, 2023 · 3 min · 545 words · Xavier Loera Flores

Big O, Omega, & Theta

Big O Big O is used to to represent the general asymptotic growth of an algorithm. These algorithms are measured as a factor of O(n). When representing a function in Big O, it is common to leave out any constant factors of n as well as any other constant atomic operations. A function that runs in $3n^2 + 5$ will be represented as $O(n^2)$ since we only care about the asymptotic growth of a function....

November 17, 2023 · 1 min · 203 words · Xavier Loera Flores