I’ve been challenged to start the #100DayCodeChallenge, and guess what?! Challenge Accepted!! So for the next 100 days, I’ll be sharing my knowledge, learning, and experiences.
Below is my progress from previous days, and I’ll now be updating regularly from today. If you’re up for it, join me on this adventure!
Before we write a single line of code, we need a clear plan. The below diagram, created with Dia, represent the initial design phase, outline the structure and functionality of the system we’ll be building. It serves as our blueprint and first step, ensuring we stay organized and focused throughout the development process.
We’re building an Outdoor Adventure Gear e-commerce site. This flowchart maps the user journey from searching for gear to completing checkout. By visualizing this process, we can ensure a smooth and intuitive experience for our users. These ‘roots’ will support a robust and user-friendly platform.
So as I said planning is crucial in software development. It help us visualize the different components of the system, how they interact, and the overall flow of information. This process prevents costly mistakes later on and ensures a more robust and efficient final product. Let’s take a closer look of our simplified system design…
Day 2 of 100daysofcode : Time Complexity and Big-O Notation
let’s suppose we write a code and we understand it well, but do you ever thought if your code is scalable and clean?
So here comes time complexity to help us measures how the runtime of an algorithm changes as the input size increases. It helps evaluate the efficiency of algorithms and choose the best one for a task. Often expressed using Big-O notation, which provides an upper bound on the worst-case scenario.
Big O notation is used to describe the upper bound of an algorithm’s runtime. It gives an idea of the worst-case scenario as input size grows.
Common Big O notations include:
O(1): Constant time
O(log n): Logarithmic time
O(n): Linear time
O(n²): Quadratic time
O(2ⁿ): Exponential time
Below are two examples on how to find complexity using Big-O notation: