码迷,mamicode.com
首页 >  
搜索关键字:turn    ( 27138个结果
字符串的排序 --剑指offer
题目描述 输入一个字符串,按字典序打印出该字符串中字符的所有排列。例如输入字符串abc,则打印出由字符a,b,c所能排列出来的所有字符串abc,acb,bac,bca,cab和cba。 输入描述: 输入一个字符串,长度不超过9(可能有字符重复),字符只包括大小写字母。递归方法:代码有点难理解 就记下 ...
分类:编程语言   时间:2020-03-07 16:22:40    阅读次数:95
33. 搜索旋转排序数组
力扣👈 假设按照升序排序的数组在预先未知的某个点上进行了旋转。 ( 例如,数组 [0,1,2,4,5,6,7] 可能变为 [4,5,6,7,0,1,2] )。 搜索一个给定的目标值,如果数组中存在这个目标值,则返回它的索引,否则返回 -1 。 你可以假设数组中不存在重复的元素。 你的算法时间复杂度 ...
分类:编程语言   时间:2020-03-07 15:55:19    阅读次数:79
JavaScript字符串的处理
如有错误,还请指出 字符串转为json对象 var M = {}; M.StrToJSON = function(str){ if(str=="" || str==null) return null; return eval('(' + reqstr + ')');;//将json字符串转换为jso ...
分类:编程语言   时间:2020-03-07 13:19:25    阅读次数:91
React-hooks
React Hooks: let you use React without classes.(对于已有的使用class定义的React组件,官方不推荐全部重写。可将react hooks用于新创建的React组件)。 使用class定义React component有什么弊端:a. this指向不 ...
分类:其他好文   时间:2020-03-07 13:18:38    阅读次数:59
152. Maximum Product Subarray
Input: [2,3,-2,4] Output: 6 Explanation: [2,3] has the largest product 6. Input: [2,-5,-2,-4,3] Output: 24 Explanation: [-2,-4,3] has the largest prod ...
分类:其他好文   时间:2020-03-07 13:08:31    阅读次数:54
alicode45-最活跃的数
1 package solution45; 2 import java.util.*; 3 class Solution { 4 public int solution(int n, int[] nums) { 5 HashMap<Integer, Integer> map = new HashMa ...
分类:其他好文   时间:2020-03-07 10:09:29    阅读次数:58
归并排序模板(Java)
```javaimport java.util.Scanner;import java.io.BufferedInputStream;class Main{ static int N = (int) 1e5 + 10,len; static int[] q = new int[N],temp = n... ...
分类:编程语言   时间:2020-03-07 09:53:15    阅读次数:76
字符串string中指定子字符串pattern的个数
1 ;;;name:BF-Str-PatternNum 2 ;;;desc:字符串string中指定子字符串pattern的个数 3 ;;;arg:pattern:要统计其个数的子串 4 ;;;arg:string:字符串,在其中搜索pattern并计数 5 ;;;return:字符串string中 ...
分类:其他好文   时间:2020-03-07 09:44:33    阅读次数:79
清华大学机试 特殊乘法 Easy
基本思想: 无; 关键点: 无; #include<iostream> #include<vector> #include<string> using namespace std; int charge(string a, string b) { int cnt=0; for (int i = 0; ...
分类:其他好文   时间:2020-03-07 09:35:02    阅读次数:64
Task / HDU - 4864
Input PS ...
分类:其他好文   时间:2020-03-06 23:43:43    阅读次数:69
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!