该文被密码保护。 阅读全文
posted @ 2017-05-28 20:57 anghostcici 阅读(2) 评论(0) 推荐(0) 编辑
摘要: For an array A, if i < j, and A [i] > A [j], called (A [i], A [j]) is a reverse pair.return total of reverse pairs in A. Example Given A = [2, 4, 1, 3 阅读全文
posted @ 2017-08-27 11:23 anghostcici 阅读(79) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smal 阅读全文
posted @ 2017-08-27 11:15 anghostcici 阅读(117) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2017-08-25 14:28 anghostcici 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the or 阅读全文
posted @ 2017-08-14 19:49 anghostcici 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If the 阅读全文
posted @ 2017-08-14 19:39 anghostcici 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit 阅读全文
posted @ 2017-08-10 23:01 anghostcici 阅读(77) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-07-21 23:51 anghostcici 阅读(5) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
posted @ 2017-06-19 18:21 anghostcici 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -- 阅读全文
posted @ 2017-06-18 01:14 anghostcici 阅读(94) 评论(0) 推荐(0) 编辑
摘要: You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. The null node needs to be rep 阅读全文
posted @ 2017-06-09 00:09 anghostcici 阅读(486) 评论(0) 推荐(0) 编辑