摘要: Insert a new element at a specific index in the given linked list. The index is 0 based, and if the index is out of the list's scope, you do not need 阅读全文
posted @ 2018-03-29 12:52 davidnyc 阅读(216) 评论(0) 推荐(0)
摘要: Given a matrix of size N x M. For each row the elements are sorted in ascending order, and for each column the elements are also sorted in ascending o 阅读全文
posted @ 2018-03-29 12:28 davidnyc 阅读(118) 评论(0) 推荐(0)
摘要: Find the K smallest numbers in an unsorted integer array A. The returned numbers should be in ascending order. Assumptions A is not nullK is >= 0 and 阅读全文
posted @ 2018-03-29 10:45 davidnyc 阅读(171) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/binary-tree-level-order-traversal/description/ Given a binary tree, return the level order traversal of its nodes' value 阅读全文
posted @ 2018-03-29 09:57 davidnyc 阅读(95) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index where it would be if it were inserted in order. AssumptionsIf there are multiple elements wi 阅读全文
posted @ 2018-03-29 02:10 davidnyc 阅读(151) 评论(0) 推荐(0)
摘要: Given a target integer T and an integer array A sorted in ascending order, Find the total number of occurrences of T in A. Examples A = {1, 2, 3, 4, 5 阅读全文
posted @ 2018-03-29 01:29 davidnyc 阅读(271) 评论(0) 推荐(0)