Breaking down the Boyer–Moore majority vote algorithm with examples in Python.
Posts tagged: Algorithms
Solutions for: Move Zeroes, Merge Two Sorted Lists, and Merge Two Binary Trees.
Solutions for: Flipping an Image, Leaf-Similar Trees, and Maximum Depth of N-ary Tree.
Solutions for: Invert Binary Tree, N-ary Tree Postorder Traversal, and N-ary Tree Preorder Traversal.
Solutions for: Monotonic Array, Max Consecutive Ones, and Contains Duplicate.
Solutions for: Range Sum of BST, Max Increase to Keep City Skyline, and Custom Sort String.
Solutions for: Verifying an Alien Dictionary, Reverse Only Letters, and Backspace String Compare.
Solutions for: Reverse Vowels of a String, Isomorphic Strings, and Reverse Words in a String.
Solutions for: Single Number II, Fibonacci Number, and Ransom Note.
Solutions for: Majority Element, Detect Capital, and Not Boring Movies.
Solutions for: Encode and Decode TinyURL, Insert into a Binary Search Tree, Minimum Add to Make Parentheses Valid, and Goat Latin.
Solutions for: Two Sum, Valid Anagram, and Length of Last Word.
Solutions for: Keyboard Row, Reorder Log Files, and Single Number.
Solutions for: Uncommon Words from Two Sentences, Search in a Binary Search Tree, and Fizz Buzz.
Solutions for: Reverse Words in a String III, Sort Array By Parity II, and Reverse String.
Solutions for: Sort Array By Parity, Robot Return to Origin, and Self Dividing Numbers.
Solutions for: N-Repeated Element in Size 2N Array, Univalued Binary Tree, and Unique Morse Code Words.
Episode one of tacking Leetcode problems and discussing solutions. Jewels and Stones, Unique Email Addresses, and To Lower Case.