Given two positive integers
A factor of an integer
n is defined as an integer
n % i == 0.
Consider a list of all factors of
Typescript is a language that has been quickly gaining traction in the programming world and something that I have been interested in learning for a while. Therefore, I thought the best way to show what I am learning is to blog about it. Therefore, this is part 1 of my journey into learning TypeScript where I will cover what TypeScript is and static typing.
You are given two binary trees
Imagine that when you put one…
n non-negative integers
a1, a2, ..., an , where each represents a point at coordinate
n vertical lines are drawn such that the two endpoints of the line
i is at
(i, ai) and…
await are two keywords that can help make asynchronous code read more like synchronous code. This can help code look cleaner while keeping the benefits of asynchronous code. Asynchronous means that things can happen independently of the main program flow. Most programs are asynchronous and pause their execution until they are needed, allowing the computer to execute other things in the meantime.
await are functions built on promises. A promise is commonly defined as a proxy for a value that will eventually become available. Promises are one way to deal with asynchronous code.
Here is an article I wrote on Linked Lists and goes through a LeetCode problem.
Recap, a linked list is a linear collection of nodes where each node points to the next node. Each node has a value property and a next property which references the next node in the list.
This is what makes linked lists a linear data structure. There is a sequence and an order to the list. To get to the end of the list, we must start at the…