Posts

What Is An Algorithm?

Image
 An Algorithm is simply a set of instructions to solve a problem. That's it. We use algorithms more often than we think.  For example: When following a recipe, you are using a cooking recipe. You are following a set of instructions to solve the problem of how to cook the food. Let's look at a more programming related example. And as always this will be done in pseudocode. Let's say we are given a list of [1,4,3] and we want to sort this list in increasing order. Well approaches could we take to solve this? First we'll look at bubble sort. Bubble Sort: Check indices 0 & 1 if list at index 0 is larger than index 1, swap the values so that index 1(the smaller number) comes before index 2 (the larger number). continue this process for index 1 & 2, 2 & 3 and so on  check if the list is sorted, if not, run this process again Bubble sort works, however can be very slow, in other words, have a very slow time complexity(how long it take an algorithm to solve the prob

Introduction To Algorithms And Data Structures

 Before I start talking about coding in high-level languages such as Python, Swift or Java, or low level languages such as Rust and C++, my next several posts will be about concepts such as Algorithms & Data Structures. When I first began programming, I was heavily leaning on the idea of actually coding. I guess this comes from how glorified movies make it, but the truth is Computer Science is much more in depth than just the code. By first getting exposed to how to think like a Computer Scientist, it helps focus on your problem solving skills, which is the real objective for anyone that programs, isn't it? To come up with a solution to a problem using any tools necessary. And with that, stick around for my next post, where we'll be discussing Algorithms, what they are and why we need them.

About Me

 Welcome To ByteTrack! A simple blog where I post code I've worked on, things I've learned and would like to share, and anything else relating to my Computer Science journey. Lets Talk About Me My name is Gurtej Grewal, I'm a student attending Carleton University. My major is Computer Science so we'll definitely see a lot of related topics on here. Aside from my school/career life, I enjoy going to the gym, boxing, and during the winter snowboarding(although I'm not every good at it yet).  As I begin to post more, feel free to comment on anything you see, and if you see a mistake or something that could be improved! Contact Info: Email: bytetrack.contact@gmail.com