Open in app
Home
Notifications
Lists
Stories

Write
Michael Horowitz
Michael Horowitz

Home

Mar 15, 2021

Contains and removing duplicates in arrays

The problems read as follows, for contains duplicates: Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example…

3 min read


Mar 9, 2021

Buy-Sell Stocks II

You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times). Note: You may…

2 min read


Feb 16, 2021

Solving the largest possible integer

Our problem is asking us to return the largest possible integer after adding a 5 among the digits. For example, when given the number 268 our expected output is 5268, and when given 670 we are expected to return 6750. …

2 min read


Feb 8, 2021

Missing integer in JS

The missing integer problem asks for the return of the smallest positive integer (greater than 0) that does not occur in the given array. For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5. Given A = [1, 2, 3], the function should return…

1 min read


Feb 1, 2021

Linked List

A linked list is a sequence of data structures connected through links. This means that each element in the linked list points to the next element. Linked lists are the second most used after arrays. Here are terms commonly used with a linked list. Link − Each link of a…

2 min read


Jan 25, 2021

Solving Min Max

The “Min-Max” problem description is as follows when given an array A the length N, we must find the sum of the minimum and maximum elements in the array. It is also asked that we make the least amount of comparisons as necessary. Our input format is the only argument…

2 min read


Jan 16, 2021

Stacks in JS and Parenthesis Matching

Stacks are a useful data structure that holds a list of elements. A stack works in a “last in”, “first out” principle meaning that the most recently added element is the first one to remove. The stack has two main methods that we use, .push() and .pop(). const reverse =…

2 min read

Stacks in JS and Parenthesis Matching
Stacks in JS and Parenthesis Matching

Jan 11, 2021

What is Big O?

Big O notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. In computer science, big O notation is used to classify algorithms according to how their run time or space requirements grow as the input size…

2 min read


Jan 10, 2021

Understanding CSS part-3

Pseudo Classes Anchor Pseudo-classes Hover on <div> Matching First Child Elements Pseudo-classes are used in order to define a specific state of an element. Examples for uses of pseudo-classes are as follows: styling a specific element with a mover hover, or whether a link was visited or not, as well…

2 min read


Sep 30, 2020

Understanding CSS part 2

Intro: This is a part 2, if you want to see part 1 here is the link and come back :). https://medium.com/@mjhorowitz714/understanding-css-part-1-62d6aba3ce42 How to insert your CSS: There are three ways you can attach CSS to your application. The first is inline CSS, internal CSS, and external CSS. Inline CSS: …

3 min read

Understanding CSS part 2
Understanding CSS part 2
Michael Horowitz

Michael Horowitz

Following
  • Alex Beciana

    Alex Beciana

  • Jim Ferdous

    Jim Ferdous

  • Sam Lesser

    Sam Lesser

  • Karan S. Chauhan

    Karan S. Chauhan

  • Ben Dunn

    Ben Dunn

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable