07 2017 档案

摘要:1>获取 1.1:字符串中包含的字符数,也就是字符串的长度。 int length():获取长度 1.2:根据位置获取位置上某个字符。 char charAt(int index) 1.3:根据字符获取该字符在字符串中的位置。 int indexOf(int ch):返回的是ch在字符串中第一次出现 阅读全文
posted @ 2017-07-31 22:57 mstark 阅读(2053) 评论(0) 推荐(0)
摘要:HashMap的应用可以提高查找的速度,键key,值value的使用拜托了传统数组的遍历查找方式,对于判断一个字符或者字符串是否已经存在的问题可以非常好的解决。而本题需要解决的问题就是判断新遍历到的字符是否已经存在于左left,右right,字符构成的子串之中。 解题思路:设置一个left作为子串的 阅读全文
posted @ 2017-07-31 21:56 mstark 阅读(206) 评论(0) 推荐(0)
摘要:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. 阅读全文
posted @ 2017-07-28 21:27 mstark 阅读(165) 评论(0) 推荐(0)
摘要:思考的方向不对,即使用了多于别人几倍的时间,也不一定能够达到终点。 我的错误的想法(可以跳过):在leetcode上面做的第四道题,走路一个很大的弯路,收到之前做过的 Container With Most Water 的思路的影响,自己也想到了可以使用两个指针从左右遍历数组, 然而自己在这里走偏了 阅读全文
posted @ 2017-07-28 21:20 mstark 阅读(208) 评论(0) 推荐(0)
摘要:vscode这款编辑器让人用起来很舒服,但是刚刚入手的童鞋可能会对其插件的安装产生一些恐惧,虽然vscode提供了插件的搜索和安装,但是其中一些插件是需要一些软件或者包之类的东西做支撑的,并不是在vscode里面下载好了之后就可以使用了,下载好了插件但是没有实现支撑的话vscode频繁的报错真的能逼 阅读全文
posted @ 2017-07-27 11:52 mstark 阅读(15840) 评论(0) 推荐(1)
摘要:题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e 阅读全文
posted @ 2017-07-25 21:38 mstark 阅读(241) 评论(0) 推荐(0)
摘要:做leetcode题目的第二天,我是按照分类来做的,做的第一类是Array类,碰见的第二道题目,也就是今天做的这个,题目难度为hard。题目不难理解,但是要求到了时间复杂度,就需要好好考虑使用一下算法了。刚开始没啥思路,就用暴力的方法,用双层循环遍历的一下两个已经排好序的数组 ,在中间位置停止找道中 阅读全文
posted @ 2017-07-25 19:41 mstark 阅读(188) 评论(0) 推荐(0)
摘要:暑假刚开始想了解一下Python,使用vscode进行编写,根据vscode 的提示安装了一些不知道干啥的插件,编写过程中提示说 "Linter pylint is not installed" 之后参训了解到:我们只在vscode里面下载了辅助插件,但是没有下载Python的扩展安装包. 在安装P 阅读全文
posted @ 2017-07-24 16:28 mstark 阅读(48699) 评论(0) 推荐(0)
摘要: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 ex 阅读全文
posted @ 2017-07-24 00:09 mstark 阅读(244) 评论(0) 推荐(0)
摘要:第一步: 修改my.ini文件,替换为以下内容 (skip_grant_tables***重点) 第二步: 进入到MySQL的安装目录,按 shift+(鼠标右键) 点击命令行窗口 使用mysqld --initialize 进行初始化 (会在安装目录下创建一个data文件夹) 第三步: 在安装目录 阅读全文
posted @ 2017-07-23 21:01 mstark 阅读(265) 评论(0) 推荐(0)