In today’s blog post, let’s go over a recent algorithm problem I solved without any helper/high order functions. I was told to find the minimum and maximum value in an array without the functions min and max.
Today we will analyze an algorithm I was asked to solve recently.
Question: Write a that counts the total number of characters of every number between two numbers (inclusive) spelled out, with whitespace, hyphens and “and” omitted…
What is a high order function?
A function that takes in a function as an argument, returns a function, or both. Yes, functions can take in other functions, they are closures. A closure is a self-contained block of code that can be passed around. Functions are…
A linked list contains ordered items, where each item is a node. There are single linked lists, where each node only has a reference to the next node. Then there is the doubly linked list, where each node references the previous node and the next node. The head node is the first node in your linked list…
Implementing a Binary Search Tree:
Let’s get one thing clear, if you’re going to implement a BST, the underlying assumption is that you have the values that you are trying to sort in the order that you want them to be sorted in. If you call your binary search tree…