Daily Question – 0141. Linked List Cycle
This problem also employs the “Two Pointers” technique, which is rather ingenious.
Daily Question – 1750. Minimum Length of String After Deleting Similar Ends
This is an easy one, just use the two pointers.
Daily Question – 0977. Squares of a Sorted Array
Description: https://leetcode.com/problems/squares-of-a-sorted-array/description Code:
Daily Question – 2864. Maximum Odd Binary Number
Description: https://leetcode.com/problems/maximum-odd-binary-number/description Notes: That’s not a hard one.
Daily Question – 1609. Even Odd Tree
It’s very natural and clear to use the BFS algorithm. Not too complicated, but need to check the details more carefully
0513. Find Bottom Left Tree Value
Description: https://leetcode.com/problems/find-bottom-left-tree-value/description Notes: BFS Code:
Daily Question – 0543. Diameter of Binary Tree
Description: https://leetcode.com/problems/diameter-of-binary-tree/description Notes: Code:
Daily Question – 0100. Same Tree
Use the following function to convert the array to treeNode.
Daily Question – *2709. Greatest Common Divisor Traversal
We can translate the question into: ‘Consider each number as a node in a graph, and if the greatest common divisor (gcd) of two numbers is not 1, then link them. Check if the graph is connected.’