Posts

Finite State Machines (FSM)

Image
Finite State Machines is a model of computation that can be used to model the behavior of a system. Example Here is an example of a simple state machine: This state machine models a button state machine that controls the power to some other system.  A state is represented as a circle, in this example: "Power On" and "Power Off".  A transition is represented by an arrow leading from one state to another: "Button click". Let us do a quick run through of what this represents.  We imagine that this state machine is controlling the lights in your room.  You enter the room, and it is dark.  This means that you are currently in the state "Power Off".  You want to turn on the lights, and in order to that you click the button that turns the light on.  This is taking the transition from "Power Off" --> "Power On" through the "event" Button Click. How does this Apply to Computer Science? I first learned th...

First Technical Interview (On-Site)

Here is part 2 post of my Western Digital interview experience. I'll split this post into two parts, my preparation for the interview, and the interview itself. Preparing for the Interview Feel free to skip over this part if you just want to know how the interview went. So I was able to pass the online and phone interview.  Awesome!  Next I was given instructions to go to their Irvine Campus for an onsite interview. Here was my gameplan for the day: (The interview was scheduled for 9:00am) Wake up at 7:30am Do my bathroom ritual Get a bowl of cereal Skim over some array/search/behavioral questions from my interview book Get dressed Leave apartment 8:20 (5 minute drive to campus) Arrive at campus around 8:30 (They mentioned be there 15 minutes prior to interview) It is definitely good to psyche yourself up and plan out your morning the day before the interview.  Be sure to lay out the clothes you plan to take, the necessary items (keys, resumes, pen, e...

First Technical Interview (The Pre-Interview)

Image
For this post, I wanted to go over my recent interview with Western Digital.  I think this will be helpful for those looking to go into their first technical interview, just as this was for me. The Pre-Interview This portion of the interview consisted of two parts: an online assessment and phone interview. Online Assessment This portion of the interview process was completed on the website: www.InterviewStreet.com . Some of you may be familiar with the format, because it is connected with HackerRank, a popular platform used in many coding competitions.  This assessment consisted of around 14 problems, with the last two problems being coding problems.  The rest of the problems consisted of logic problems, some (confusing) hardware table problems, and some understanding programming concept problems.  The two problems given were written into their provided compiler.  The good thing compared to previous assessments that I had to take was that it allo...

Hash Tables

Image
Preface Hash Tables are a very important data structure that I think that many novice programmers such as myself don't fully utilize in their programming. Here I will explain: What is a Hash Table? How do they Work? What are some effective uses for Hash Tables? What is a Hash Table? Hash tables can be classified as "associate arrays", which basically it is an array structure that can map a "key" to some "value".  A key is some unique identifying value that you can use to "identify" some specific object or value.   I think the most given example of this key/value pairing would be the student ID example.  For each student, they can be identified by their unique student ID.  No other student can have their student ID as long as the student is active in the school.  What is associated with that student ID, is a student record, which may contain: age, school level, classes taken, and any other data you would like to record.  ...

Second Wind!

I decided to revive this blog because it would be a great place to keep track of my progress as I dive back into the realm of coding.  Now that I will be taking a lighter school load, I should have more time to explore concepts and information that I will be able to generate more content for this site.  If you didn't notice, is now www.jamlouie.com!  Achievement unlocked - buy a domain!  Pretty cool stuff.   In my following posts, I will be mainly focused on both things that I am picking up from Lynda.com, as well as interview questions that I am using to prepare for upcoming interviews for internships.

Asymptotic Notation

Image
Asymptotic Notation, or Landau Notation Asymptotic Notation is used to describe the limiting behavior of a function as it approaches a particular value or infinity. We have already seen a glimpse of this in the last post when we were discussing Order of Growth of functions.  Ex: O(n) When discussing asymptotic notation, there are three key terms: Theta Notation - A function that bounds a function within constant factor after a particular n. Big O Notation - represents the upper bound of Theta-Notation. Big Omega Notation - represents the lower bound of theta-notation. Taken from:  Florida State University In the graph above, (c2 g(n)) represents Big O Notation, because for each n after n0, O(g(n)) >= f(n).   (c1 g(n)) represents Big Omega Notation because for each n after n0, Omega(g(n)) <=  f(n). There is an O-notation and Omega-notation, so therefore there exists a Theta-notation for the function f(n). For O-notation and Omega-no...

Algorithms - Introduction to the Basic Concepts

Image
Chapter 2 - Getting Started Loop Invariant, Case Analysis, Order of Growth Checking the loop invariant When analyzing an algorithm using a loop invariant (which consists of the elements originally in positions that have been sorted already) to see if it is correct, we check 3 properties: Initialization - Loop invariant must be true prior to the first iteration of the loop. Maintenance - Must be true before the beginning of a loop, and remain true before the next iteration of the loop. Termination - When the loop terminates, the loop invariant must yield correct results that helps shows that the algorithm is correct. The first two properties helps to shows that the loop of the algorithm is correct.  The third properties is a confirmation that the algorithm has worked. Lets put this into a better understanding now, by using insertion sort. List given:  4 3 1 2 5 6 Initialization - Since insertion sort starts at the second element, the only part that is ...