摘要:
真的是太久太久没有刷题了。。。。那天阿里面到这么简单的题目发现自己都写不利索了。。。哭瞎。。。 Reverse a singly linked list. 可以用递归和非递归的方法。 递归: 主要思想是定义一个nextNode,用nextNode作为尾部直接连前面一个。 非递归: C++做法,虽然现 阅读全文
摘要:
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 阅读全文
摘要:
Find K-th largest element in an array. and N is much larger than k. Notice You can swap elements in the array Find K-th largest element in an array. a 阅读全文
摘要:
Given some points and a point origin in two dimensional space, find k points out of the some points which are nearest to origin.Return these points so 阅读全文
摘要:
There are two properties in the node student id and scores, to ensure that each student will have at least 5 points, find the average of 5 highest sco 阅读全文
摘要:
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
摘要:
Given an array of integers, find how many unique pairs in the array such that their sum is equal to a specific target number. Please return the number 阅读全文
摘要:
Given an array of integers, find how many pairs in the array such that their sum is less than or equal to a specific target number. Please return the 阅读全文
摘要:
Given an array of n objects with k different colors (numbered from 1 to k), sort them so that objects of the same color are adjacent, with the colors 阅读全文
摘要:
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to 阅读全文