LeetCode 235. Lowest Common Ancestor of a Binary Search Tree
Description https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the…
Description https://leetcode.com/problems/flatten-binary-tree-to-linked-list/ Given the root of a binary tree, flatten the tree into a “linked list”: The “linked list” should use the…
Description https://leetcode.com/problems/permutations-ii/ Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. Example 1: Input: nums…
Description https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/ Convert a Binary Search Tree to a sorted Circular Doubly-Linked List in place. You can think of the left and right pointers…
Total 79 questions. Introduction “Interviewing for a technical job is hard, and so is being the interviewer. You want to…
Description https://leetcode.com/problems/accounts-merge/ Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the…
Description https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According…
Description https://leetcode.com/problems/flood-fill/ An image is represented by an m x n integer grid image where image[i][j] represents the pixel value of the image. You are also…
Description https://leetcode.com/problems/reorder-data-in-log-files/ You are given an array of logs. Each log is a space-delimited string of words, where the first word…
Description https://leetcode.com/problems/maximum-product-difference-between-two-pairs/ The product difference between two pairs (a, b) and (c, d) is defined as (a * b) – (c * d). For example, the product…