Open in app

Sign In

Write

Sign In

Anatolii Kurochkin
Anatolii Kurochkin

123 Followers

Home

About

Published in

The Startup

·Pinned

JavaScript Algorithms: Binary Tree Right Side View (LeetCode)

Description Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example: Input: [1,2,3,null,5,null,4] Output: [1, 3, 4] Explanation: 1 <--- / \ 2 3 <--- \ \ 5 4 <--- Solution Every time when…

JavaScript

2 min read

JavaScript Algorithms: Binary Tree Right Side View (LeetCode)
JavaScript Algorithms: Binary Tree Right Side View (LeetCode)
JavaScript

2 min read


Dec 15, 2020

JavaScript Algorithms: Verifying an Alien Dictionary (LeetCode)

Description In an alien language, surprisingly they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters. Given a sequence of words written in the alien language, and the order of the alphabet, return true if and only if…

JavaScript

3 min read

JavaScript Algorithms: Verifying an Alien Dictionary (LeetCode)
JavaScript Algorithms: Verifying an Alien Dictionary (LeetCode)
JavaScript

3 min read


Dec 8, 2020

JavaScript Algorithms: Merge intervals (LeetCode)

Description Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. Example 1: Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6]. Example…

Leetcode

2 min read

JavaScript Algorithms: Merge intervals (LeetCode)
JavaScript Algorithms: Merge intervals (LeetCode)
Leetcode

2 min read


Nov 30, 2020

JavaScript Algorithms: Number of Islands (LeetCode)

Description Given an m x n 2d grid map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example…

JavaScript

3 min read

JavaScript Algorithms: Number of Islands (LeetCode)
JavaScript Algorithms: Number of Islands (LeetCode)
JavaScript

3 min read


Nov 29, 2020

JavaScript Algorithms: Find All Duplicates in an Array (LeetCode)

Description Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twice in this array. Could you do it without extra space and in O(n) runtime? Example: Solution The first solution that…

JavaScript

2 min read

JavaScript Algorithms: Find All Duplicates in an Array (LeetCode)
JavaScript Algorithms: Find All Duplicates in an Array (LeetCode)
JavaScript

2 min read


Nov 24, 2020

JavaScript Algorithms: Meeting Rooms (LeetCode)

Description Given an array of meeting time intervals where intervals[i] = [starti, endi], determine if a person could attend all meetings. Example 1: Input: intervals = [[0,30],[5,10],[15,20]] Output: false Example 2: Input: intervals = [[7,10],[2,4]] Output: true Constraints: 0 <= intervals.length <= 104 intervals[i].length == 2 0 <= starti < endi…

JavaScript

2 min read

JavaScript Algorithms: Meeting Rooms (LeetCode)
JavaScript Algorithms: Meeting Rooms (LeetCode)
JavaScript

2 min read


Nov 15, 2020

JavaScript Algorithms: Valid Parentheses (LeetCode)

Description Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Example 1: …

JavaScript

3 min read

JavaScript Algorithms: Valid Parentheses (LeetCode)
JavaScript Algorithms: Valid Parentheses (LeetCode)
JavaScript

3 min read


Oct 18, 2020

JavaScript Algorithms: Balanced Binary Tree (LeetCode)

Description Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the left and right subtrees of every node differ in height by no more than 1. Example 1:

JavaScript

3 min read

LeetCode 110. Balanced Binary Tree [JavaScript]
LeetCode 110. Balanced Binary Tree [JavaScript]
JavaScript

3 min read


Oct 8, 2020

JavaScript Algorithms: Integer to Roman (LeetCode)

Description Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, 2 is written as II in Roman numeral, just two one's added together. 12 is written…

JavaScript

3 min read

JavaScript Algorithms: Integer to Roman (LeetCode)
JavaScript Algorithms: Integer to Roman (LeetCode)
JavaScript

3 min read


Sep 30, 2020

JavaScript Algorithms: Roman to Integer (LeetCode)

Description Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II in Roman numeral, just two one's added together. Twelve is written…

Leetcode

2 min read

LeetCode 13. Roman to Integer [JavaScript]
LeetCode 13. Roman to Integer [JavaScript]
Leetcode

2 min read

Anatolii Kurochkin

Anatolii Kurochkin

123 Followers

Senior Software Engineer @Lyft, San Francisco https://anatolii.us/

Following
  • Roman Melnik

    Roman Melnik

  • Eric Elliott

    Eric Elliott

  • Konstantin Kolesnikov

    Konstantin Kolesnikov

  • Ruslan Rakhmedov

    Ruslan Rakhmedov

  • DoorDash

    DoorDash

See all (17)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams