码迷,mamicode.com
首页 >  
搜索关键字:turn    ( 27138个结果
字符串中的第一个唯一字符 python
给定一个字符串,找到它的第一个不重复的字符,并返回它的索引。如果不存在,则返回 -1。 s = "leetcode" 返回 0. s = "loveleetcode", 返回 2. class solution: def getChar(self,s): setS = set(s) dict = { ...
分类:编程语言   时间:2020-03-09 01:45:04    阅读次数:112
java 折半查找
public static void main(String[] args) { int[] arr = {0,1,2,3,4,5,6,7,8,9,10}; System.out.println(halfSearch_2(arr,5)); } public static int halfSearch ...
分类:编程语言   时间:2020-03-09 01:41:44    阅读次数:80
[LintCode] 1835. Number of Ways to Stay in the Same Place After Some Steps I
You have a pointer at index 00 in an array of size arrLenarrLen. At each step, you can move 11 position to the left, 11 position to the right in the a ...
分类:其他好文   时间:2020-03-09 01:38:36    阅读次数:87
php计算两个日期相隔多少年,多少月,多少天
示例: 作者:xingguang 链接:原文链接: "https://www.tiance.club/post/2705668210.html" ...
分类:Web程序   时间:2020-03-09 00:56:52    阅读次数:69
数据结构与算法题目集(中文) 6-9 二叉树的遍历 (25分)
1 // #include <stdio.h> 2 // #include <stdlib.h> 3 4 // typedef char ElementType; 5 // typedef struct TNode *Position; 6 // typedef Position BinTree; ...
分类:编程语言   时间:2020-03-09 00:48:28    阅读次数:125
习题2.5 两个有序链表序列的合并 (15分)
本题要求实现一个函数,将两个链表表示的递增整数序列合并为一个非递减的整数序列。 函数接口定义: List Merge( List L1, List L2 ); 其中List结构定义如下: typedef struct Node *PtrToNode; struct Node { ElementTyp ...
分类:其他好文   时间:2020-03-09 00:42:00    阅读次数:64
hello django
1.用pycharm 创建Django 项目 hello_django 2.新建views.py 文件 写入 方法 def index_view(request): return HttpResponse('hello world') 3.在 urls 中 加入 path('hello/', vie ...
分类:其他好文   时间:2020-03-08 21:33:42    阅读次数:68
Math 104A Homework
Math 104A Homework #4 ?General Instructions: Please write your homework papers neatly, and follow TA’s instructions(on Gauchoapace) to turn it in. Wri ...
分类:其他好文   时间:2020-03-08 19:19:57    阅读次数:68
spark Accumulator累加器使用示例
官网 http://spark.apache.org/docs/2.3.1/rdd-programming-guide.html#accumulators http://spark.apache.org/docs/2.3.1/api/scala/index.html#org.apache.spark ...
分类:其他好文   时间:2020-03-08 17:55:40    阅读次数:96
Nuxt简单使用Google/Baidu Analyze
博客地址: https://www.seyana.life/post/17 具体账号注册方法和绑定方法可以去到官网下,都有相应的指南, 一般设置也比较简单,只需要把对应js代码添加到head中即可, 这里主要是在Vue中使用Nuxt plugin添加这些信息,并且在后台管理analyze id。 百 ...
分类:其他好文   时间:2020-03-08 17:50:04    阅读次数:108
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!