Published onNovember 30, 2021[LeetCode 20] Valid ParenthesesStackGiven a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
Published onNovember 29, 2021[LeetCode 15] 3SumSortingGiven an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i !
Published onNovember 29, 2021[LeetCode 14] Longest Common PrefixTwoPointersWrite a function to find the longest common prefix string amongst an array of strings.
Published onNovember 25, 2021[Tree] Max Root to Leaf SumTreeWrite a function, maxPathSum, that takes in the root of a binary tree that contains number values.
Published onNovember 24, 2021[Tree] Breadth First ValuesTreeWrite a function, breadthFirstValues, that takes in the root of a binary tree.
Published onNovember 24, 2021[Tree] Depth First ValuesTreeWrite a function, depthFirstValues, that takes in the root of a binary tree.
Published onNovember 24, 2021[Tree] Tree IncludesTreeWrite a function, treeIncludes, that takes in the root of a binary tree and a target value.
Published onNovember 24, 2021[Tree] Tree SumTreeWrite a function, treeSum, that takes in the root of a binary tree that contains number values.
Published onNovember 19, 2021[Graph] Shortest PathGraphWrite a function, shortestPath, that takes in an array of edges for an undirected graph and two nodes (nodeA, nodeB).