// Directions // Write a function that returns the number of vowels // used in a string. Vowels are the characters 'a', 'e' // 'i', 'o', and 'u'. // E ...
分类:
其他好文 时间:
2019-06-21 23:54:49
阅读次数:
255
难度: 中等 题目 Given a string, find the length of the longest substring without repeating characters. 给定一个字符串,请你找出其中不含有重复字符的?最长子串?的长度。 示例?1: 输入: "abcabcbb" ...
分类:
其他好文 时间:
2019-06-16 21:49:27
阅读次数:
99
题目如下: Return the lexicographically smallest subsequence of text that contains all the distinct characters of text exactly once. Example 1: Example 2: ...
分类:
其他好文 时间:
2019-06-15 10:09:22
阅读次数:
108
Character类是一个包装类。 char这种数据类型是基于原始的Unicode编码的,储存一个char用16个bit,因此定义characters也是16位定长的实体集合。Unicode编码标准发生了变化,数量级从\uFFFF到了\u10FFFF 对Unicode标准中的所有字符,16位已经是不 ...
分类:
其他好文 时间:
2019-06-12 18:16:12
阅读次数:
88
Algorithms: https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 采用了map的存储,然后移动窗口方式解决此问题,当然看到有个动态规划,一直很难理解。 Review: https: ...
分类:
其他好文 时间:
2019-06-10 00:11:08
阅读次数:
84
找到一个跟我的思路比较接近的参考解决方案: 参考:https://leetcode.com/problems/smallest-subsequence-of-distinct-characters/discuss/308222/show-my-thinking-process ...
分类:
其他好文 时间:
2019-06-09 22:25:27
阅读次数:
136
其实这道题好像大部分人都直接用Tries倒序来解,但我觉得AC自动机可能更高效一点(毕竟是在Tries基础上优化的算法如果还不如原始Tries似乎说不过去)。 根据定义写了个原始的在堆上创建树形结构的solution但好像性能并不是很乐观。另外一些用AC解的dalao好像是用一条线性结构存储所有结点 ...
分类:
其他好文 时间:
2019-06-09 14:32:44
阅读次数:
88
Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1 ...
分类:
其他好文 时间:
2019-06-06 00:35:13
阅读次数:
101
Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, yo ...
分类:
编程语言 时间:
2019-06-05 10:05:49
阅读次数:
153
基于tf2.0 对Kaggel Google street view characters classify 项目练手, 熟悉一下tf2.0的新特性 下载下来kaggle的数据集如下: 所有训练数据在train文件夹中, labels在trainLabels.cvs文件中, label文件格式如下: ...
分类:
其他好文 时间:
2019-06-04 22:21:53
阅读次数:
352