Let’s start with basic terminology so we may share the same language and investigate related concepts. First, what are the principles that define a Binary Search Tree?
* From here on out I will use “BST” for brevity
A BST is considered a data structure made up of nodes, like Linked Lists. These nodes are either null or have references (links) to other nodes. These ‘other’ nodes are child nodes, called a left node and right node. Nodes have values. These values determine where they are placed within the BST.
Similarly to a linked list, each node is referenced by…
Data structures are a way to organize our information. They provide a means of storing different types of data in unique ways and methods to access either all or distinct parts of it.
Have you ever used a stack? Of course! Your email is a form of a stack, new mail comes in and is placed on top. When you finish reading the latest email, you remove it from the top. In development, whenever you call a function, that is placed on a stack in the engine that processes the code.
How we use stacks is a Last In, First…
When you go the Shake Shack, most often there are other people on the line waiting to be served. The customers are arranged in a particular order, First In, First Out. Other real-life scenarios are toll booths or wedding chapels in Vegas. This method of ordering data for service, in our case, people, is what Queues are all about.
Queues are very similar to Stacks regarding interface, with the difference being Stacks process data Last In, First Out.
So we have differences in the order of processing — why? We need a different method of processing data that preserves the…
I’m going to say this right off the bat. Do you know the events that happen upon function invocation? No? Then that’s where we will start.
When we call a function, an execution context gets placed on the execution stack. Let’s break this down some more.
First, what is a stack?
A stack is a data structure that operates on a “Last In, First Out” basis. An item is “pushed” onto a stack to add to it, and an item is “popped” off the stack to remove it.
Using a stack is a method of ordering certain operations for execution.
To dig deep and get the information you need, think like a journalist. Ask the six main questions: who, what, why, where, when, and how. If you can answer all these on a particular subject, then you have garnered the essence of what you need to know.
Before we get to closures, we have to have an understanding of scope.
First, if you know what [[scope]] (double bracket scope) is, then this article isn’t for you. You have more advanced knowledge and can move on.
What is scope and why does it matter?
Scope is the context environment (also known…
Software Engineer, extreme DIY'er, husband, father, I build things.... pretty much anything.