02 2019 档案
摘要:Given a non-empty array of integers, return the k most frequent elements. Example 1: Example 2: Input: nums = [1], k = 1 Output: [1] Example 2: Note: 
        阅读全文
            
摘要:Given a binary tree, return the inorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iteratively
        阅读全文
            
摘要:Invert a binary tree. Example: Input: Output: 非递归的方法
        阅读全文
            
摘要:Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Note:
        阅读全文
            
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r
        阅读全文
            
摘要:You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of ston
        阅读全文
            
摘要:Reverse a singly linked list. Example: Follow up:A linked list can be reversed either iteratively or recursively. Could you implement both? 递归 进阶题 两两交
        阅读全文
            
摘要:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the
        阅读全文
            
摘要:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov
        阅读全文
            
摘要:Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtim
        阅读全文
            
摘要:Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction
        阅读全文
            
摘要:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le
        阅读全文
            
摘要:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you cli
        阅读全文
            
摘要:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Foll
        阅读全文
            
摘要:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example:
        阅读全文
            
摘要:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No
        阅读全文
            
摘要: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
        阅读全文
            
摘要: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 have exa
        阅读全文
            
摘要:1. TwoSum https://www.cnblogs.com/zhacai/p/10429120.html easy 2. Add Two Numbers https://www.cnblogs.com/zhacai/p/10429155.html easy 15.3Sum https://w
        阅读全文
            
 
                    
                 浙公网安备 33010602011771号
浙公网安备 33010602011771号