1. Friend Circles

    Leave a comment

    February 20, 2018 by oneOokay

    There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. …
    Continue reading

  2. BST: Inorder Successor and Predecessor

    Leave a comment

    February 8, 2018 by oneOokay

    iterative还okay. 主要是用recursive的写法. 我写的比较吃藕. 直接把人家的copy过来放这. //我的 public TreeNode inorderSuccessor(TreeNode root, TreeNode p) { return helper(null, root, p); } private TreeNode helper(TreeNode …
    Continue reading

  3. Contiguous Array

    Leave a comment

    February 8, 2018 by oneOokay

    Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Example …
    Continue reading

  4. Reservoir Sampling solution

    Leave a comment

    February 7, 2018 by oneOokay

    Random Pick Index

  5. 线段树???

    Leave a comment

    February 5, 2018 by oneOokay

    Number of Longest Increasing Subsequence

  6. TODO: Category Index Page….

    Leave a comment

    February 4, 2018 by oneOokay

    TODO: Category Page….

  7. Two Pointers

    Leave a comment

    February 4, 2018 by oneOokay

    两个指针 Remove Duplicates from Sorted Array when duplicates are allowed at most k times nums[p – k]和nums[i]进行比较 Move Zeros: inplace的把所有的0移到array的后面 …
    Continue reading