博客专栏  >  编程语言   >  数组算法

数组算法

有关动态规划算法

关注
0 已关注
44篇博文
  • 数组相关算法目录

    插入排序,冒泡排序,选择排序二分查找快速排序二分查找演变最左右端数值的整数次方斐波那契数列表示数值的字符串字符串的排列33. Search in Rotated Sorted Array三色旗问题调整...

    2018-03-11 21:32
    54
  • 78. Subsets

    Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The soluti...

    2018-04-06 22:14
    8
  • 90. Subsets II

    Given a collection of integers that might contain duplicates, nums, return all possible subsets (the...

    2018-04-06 22:22
    8
  • 35. Search Insert Position

    Given a sorted array and a target value, return the index if the target is found. If not, return the...

    2018-04-07 20:52
    13
  • 136. Single Number

    Given an array of integers, every element appears twice except for one. Find that single one.Note:Yo...

    2018-03-28 08:33
    12
  • 137. Single Number II

    Given an array of integers, every element appears three times except for one, which appears exactly ...

    2018-03-28 08:42
    19
  • 260. Single Number III

    Given an array of numbers nums, in which exactly two elements appear only once and all the other ele...

    2018-03-28 08:56
    18
  • 239. Sliding Window Maximum

    Given an array nums, there is a sliding window of size k which is moving from the very left of the a...

    2018-03-23 08:38
    11
  • 338. Counting Bits

    Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the ...

    2018-03-26 08:33
    13
  • 190. Reverse Bits

    Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in b...

    2018-03-26 09:00
    11
  • 647. Palindromic Substrings

    Given a string, your task is to count how many palindromic substrings in this string.The substrings ...

    2018-03-27 08:30
    32
  • 表示数值的字符串

    题目:请实现一个函数用来判断字符串是否表示数值(包括整数和小数)。例如,字符串“+100”、“5e2”、“-123”、“3.1416”及“-1E-16”都表示数值,但“12e”、“1a3.14”、“1...

    2018-03-17 10:01
    14
  • 字符串的排列

    输入一个字符串,打印出该字符串中字符的所有排列。例如输入字符串abc, 则打印出由字符a、b、c所能排列出来的所有字符串abc、acb、bac、bca、cab和cba。void Permutation...

    2018-03-18 16:16
    19
  • 斐波那契数列

    // ====================方法1:递归==================== long long Fibonacci_Solution1(unsigned int n) { ...

    2018-03-16 23:17
    20
  • 数值的整数次方

    bool g_InvalidInput = false; bool equal(double num1, double num2); double PowerWithUnsignedExponent(...

    2018-03-16 23:32
    25
  • 正则表达式

    // 题目:请实现一个函数用来匹配包含'.'和'*'的正则表达式。模式中的字符'.' // 表示任意一个字符,而'*'表示它前面的字符可以出现任意次(含0次)。在本题 // 中,匹配是指字符串的所有字...

    2018-03-17 00:39
    25
  • 二分查找--查找重复有序数组中最左边最右边的target

    最左边:public static int binarySearchLeft(int[] arr,int target){ if(arr==null||arr.length==0){ ...

    2018-03-16 08:04
    31
  • 旋转数组的最小数

    把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。 输入一个非递减排序的数组的一个旋转,输出旋转数组的最小元素。例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组...

    2018-03-15 08:34
    32
  • 215. Kth Largest Element in an Array

    Find the kth largest element in an unsorted array. Note that it is the kth largest element in the so...

    2018-03-14 08:32
    14
  • 414. Third Maximum Number

    Given a non-empty array of integers, return the third maximum number in this array. If it does not e...

    2018-03-14 08:45
    16
img博客搬家
img撰写博客
img发布 Chat
img专家申请
img意见反馈
img返回顶部