Category Archives: Uncategorized

  1. One Edit Distance

    Leave a comment

    September 18, 2017 by oneOokay

    Given two strings S and T, determine if they are both one edit distance apart. 杀鸡用了牛刀…写了个DP的方法,应该是写成了Edit Distance, 结果TLE了. 这题竟然磕了许久…要理清楚思路吧. One …
    Continue reading

  2. Combination Sum IV

    Leave a comment

    September 16, 2017 by oneOokay

    其他的Combination Sum Combination Sum IV Given an integer array with all positive numbers and no duplicates, find the number of …
    Continue reading

  3. TODO

    Leave a comment

    July 6, 2017 by oneOokay

    Longest Increasing Subsequence Count of Smaller Numbers After Self

  4. Merge sort

    Leave a comment

    July 3, 2017 by oneOokay

    merge sort 是一个divide and conquer. 记不住什么是merge sort大概是因为merge sort的名字里面少了divide… merge sort:包含两部分,divide和merge. 时间复杂度是:O(nlogn) Divide: recursively divide elements into two parts: 所以这里要传入一个left和right index来标明目前要divide是原array中的哪一段 …
    Continue reading

  5. Remove K Digits

    Leave a comment

    June 25, 2017 by oneOokay

    Given a non-negative integer num represented as a string, remove k digits from the number so that the new number …
    Continue reading

  6. Find Mode in Binary Search Tree

    Leave a comment

    June 21, 2017 by oneOokay

    Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given …
    Continue reading

  7. Next Greater Element II

    Leave a comment

    June 21, 2017 by oneOokay

    Given a circular array (the next element of the last element is the first element of the array), print the …
    Continue reading