摘要:
题目: Given a non-empty array of integers, return the k most frequent elements. For example,Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You may a 阅读全文
摘要:
题目: 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 t 阅读全文
摘要:
题目: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 阅读全文
摘要:
题目: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exi 阅读全文
摘要:
题目: 141.Given a linked list, determine if it has a cycle in it. 142.Given a linked list, return the node where the cycle begins. If there is no cycle, 阅读全文
摘要:
题目: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is l 阅读全文
摘要:
题目: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums exc 阅读全文
摘要:
题目: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would hav 阅读全文
摘要:
题目: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted i 阅读全文