Other 14 Nov 2021 Coding algorithm helper Tree function TreeNode(val, left, right) { this.val = (val===undefined ? 0 : val) this.left = (left===undefined ? null : left)… Andrey
Other 03 Nov 2021 Surrounding regions using flash flood algorithm Set all of the O to - across the board For each side find adjacent - and change them to… Andrey
Other 16 Aug 2021 Dynamic Programming A list of problems that will let you learn dynamic programming Maximum Subarray Can be solved with Kadane algorithm /**… Andrey
Other 13 Jul 2021 Find Peak Element with JS A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak… Andrey
Other 06 Jul 2021 Reduce Array Size to The Half with JS solved using dictionary Given an array arr. You can choose a set of integers and remove all the occurrences of these integers in the… Andrey
Other 30 Jun 2021 Lowest Common Ancestor in a Binary Tree LeetCode problem in JS solved with comparing vector path to each node Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the… Andrey
Other 10 Jun 2021 MyCalendar LeetCode problem in JS solved with double arrays Problem defenition Implement a MyCalendar class to store your events. A new event can be added if adding the event will not… Andrey
Coding 14 Apr 2021 Sparse Arrays – Hackerrank medium problem in JS solved using HashMap https://www.hackerrank.com/challenges/sparse-arrays/problem The idea is to iterate over input data and put it into HashMap with keys being available strings and… Andrey
Coding 01 Mar 2021 Moving boxes to one spot – Leetcode coding problem (Medium) Another fun problem that was pretty easy solve is moving boxes to one spot: https://leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box/ It can be solved by… Andrey
Coding, iOS 02 Apr 2020 Same Tree with Swift Problem: Given two binary trees, write a function to check if they are the same or not. Two binary trees… Andrey