码迷,mamicode.com
首页 >  
搜索关键字:eat    ( 649个结果
【字符串】49. 字母异位词分组
题目: 解答: 因为要找组成一样的单词,如何判断?最简单的,一排序,如果是同一个单词,那么就是组成一样的。比如 “eat” "tea" 排序后都为 “aet”。只要引入一个hash表,索引是排序后的单词,值为结果vector的下标,循环一遍就好了。 1 class Solution { 2 publ ...
分类:其他好文   时间:2020-05-04 13:33:06    阅读次数:46
js 继承
//父类 class Person{ constructor(name) { this.name = name } eat(){ console.log(`${this.name} eat something`) } } //子类 class Student extends Person{ cons ...
分类:Web程序   时间:2020-05-04 13:11:21    阅读次数:81
Linux网络命令详解
命令write,功能是给指定用户发信息(接收信息的用户要处于登录状态,相当于QQ的私聊),例如:用户xbb给用户liuyifei发消息:I want to eat together!(发送消息以CRTL+D保存结束) 接收消息的一方会及时显示发送消息的用户以及终端和时间,并显示具体的消息内容 命令w ...
分类:系统相关   时间:2020-05-01 12:26:53    阅读次数:68
js对象继承
现有一个父类: function People(name){ //属性 this.name = name //实例方法 this.sleep=function(){ console.log(this.name + '正在睡觉') } } //原型方法 People.prototype.eat = f ...
分类:Web程序   时间:2020-04-14 16:31:03    阅读次数:97
leetcode 49. Group Anagrams
leetcode 49. Group Anagrams Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ...
分类:其他好文   时间:2020-04-06 17:19:17    阅读次数:69
LeetCode——字母异位词分组
Q:给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。 示例: 输入: ["eat", "tea", "tan", "ate", "nat", "bat"], 输出: [ ["ate","eat","tea"], ["nat","tan"], ["bat"] ] ...
分类:其他好文   时间:2020-04-05 11:59:14    阅读次数:79
反射Demo
使用反射之前的代码 public class P1 { public void eat(){ System.out.println("p1的方法"); } } public class P2 { public void sleep(){ System.out.println("p2的方法"); } ...
分类:其他好文   时间:2020-03-27 10:48:40    阅读次数:49
Python学习之yield表达式、三元表达式与生成式
一.yield表达式的应用 在函数内可以采用表达式形式的yield。 >>> def eater(): ... print('Ready to eat') ... while True: ... food=yield ... print('get the food: %s, and start to ...
分类:编程语言   时间:2020-03-25 21:39:07    阅读次数:91
同学给我来个手写的new吧
1.手写一个new 首先看看new怎么用 function Person(name){ this.name = name } Person.prototype.eat = function() { console.log("Eating") } var qd = new Person('qd') c ...
分类:其他好文   时间:2020-03-22 13:47:42    阅读次数:75
java类的方法的使用
类的方法:提供某种功能的实现: 实例:public void eat (){ } public String getName(){ } public void setName(String n){ } 格式:权限修饰符 返回值类型(void:无返回值/具体的返回值) 方法名(形参){ } 注意:返回 ...
分类:编程语言   时间:2020-03-11 19:45:13    阅读次数:116
649条   上一页 1 ... 3 4 5 6 7 ... 65 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!