Home

13Jun2022: DS&A, apps, JS review, LeetCode

Created June 13, 2022

Data Structures and Algorithms

Today I spent some time studying sorting algorithms: bubble sort and insertion sort. I like that in the book The Self Taught Programmer the sorting functions are provided in Python, so I can try it on my Python IDLE and run them (even cooler if I could see the stack but the book prints the stack out so it's pretty good).

Bubble sort is when you compare one number to the one to the next index, and if they're not in order, swap them. The higher numbers "bubble up" to the end.

Insertion sort is taking the value at index 1 (so second element) and compare it to the previous item, swaps them if they are not in order, then taking that section as "sorted", so that you only have to go through them if the next value is smaller. If the next value is larger, leave it where it is, since that section is sorted.

That's my understanding at least. I'll check again for review tomorrow.

Some applying

I also worked on looking at a few jobs and sending in a few. I don't do an en masse sending honestly - I try to target more specifically based on what tech stack I think I will do well in and a couple other priorities I would be willing to value more. The second part of this is that it helps me understand what technologies are in demand.

JavaScript Review

I was reviewing some notes from our bootcamp on JavaScript in preparation for React - some of the funky things about JavaScript like how it accepts parameters and defined parameters, Truthy/Falsy, calling values from objects, object destructuring, ternaries, and chain operators.

I do need more review with this and it helps if I have something I'm coding rather than just reviewing/reading.

Coding Challenge

I was working on a coding challenge that I wasn't able to finish this evening - I'm going to get some help from a friend since we didn't cover writing recursive functions in class, and I'm having a bit of trouble writing a more complicated recursive function (that's not just a countdown). This one was asking to figure out if the brackets were closed in order, (eg. ({}[]) -> true; []{} -> true; [[[}[)]} -> false) and I got a bit stuck on the syntax for writing recursive functions.

So! I've sent for help and I have a lot of other friends I can ask for for help if need be, so I'm hoping I can get the coding challenge and another few exp points for coding challenges moving forward.

Continuing the learning!

Catt