Monthly Archives: July 2016

  1. 533. Two Sum Closest

    Leave a comment

    July 10, 2016 by oneOokay

    Two pointers + Sort public int twoSumCloset(int[] nums, int target) { // Write your code here if (nums == null …
    Continue reading

  2. Merge sorted array

    Leave a comment

    July 2, 2016 by oneOokay

    Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume …
    Continue reading

  3. 547. Intersection of Two Arrays

    Leave a comment

    July 2, 2016 by oneOokay

    Solve it in three algorithms: hashmap; 2. two pointers; 3. binary search. My very naive way: (BAD really BAD) (HashSet) …
    Continue reading