Articles in this series
[Problem Link] https://leetcode.com/problems/maximum-depth-of-binary-tree/ · class Solution { public int maxDepth(TreeNode root) { if(root ==...
[Problem Link] https://leetcode.com/problems/middle-of-the-linked-list/ · class Solution { public ListNode middleNode(ListNode head) { ...
[Problem Link] https://leetcode.com/problems/diameter-of-binary-tree/ · class Solution { private int diameter = 0; //diameter is longest length...
[Problem Link] https://leetcode.com/problems/add-binary/ · class Solution { public String addBinary(String a, String b) { int ptra =...
[Problem Link] https://leetcode.com/problems/majority-element/ · class Solution { public int majorityElement(int[] nums) { int ans = -1; ...
[Problem Link] https://leetcode.com/problems/reverse-linked-list/ · class Solution { public ListNode reverseList(ListNode head) { ListNode...