Description Count the number of segments in a string, where a segment is defined to be a contiguous sequence o…
标签:LeetCode
Leetcode - Smallest Rectangle Enclosing Black Pixels
My code: public class Solution { int row = 0; int col = 0; public int minArea(char[][] image, int x, int y) { …
Swift 从排序数组中删除重复项 - LeetCode
从排序数组中删除重复项 给定一个有序数组,你需要原地删除其中的重复内容,使每个元素只出现一次,并返回新的长度。 不要另外定义一个数组,您必须通过用 O(1) 额外内存原地修改输入的数组来做到这一点。 示例: 给定数组: …
LeetCode算法题-Find the Difference(Java实现-五种解法)
这是悦乐书的第214次更新,第227篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第82题(顺位题号是389)。给定两个字符串s和t,它们只包含小写字母。字符串t由随机混洗字符串s生成,然后…
180713
Excel表列序号 题目描述 给定一个Excel表格中的列名称,返回其相应的列序号。 例如, A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -&g…
Leetcode - Partition Equal Subset Sum
My code: public class Solution { public boolean canPartition(int[] nums) { if (nums.length == 0) { return true…
Leetcode 72. Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each op…
[LeetCode][Python]458. Poor Pigs
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all loo…
Interview Question - difference among, left outer join, right outer join, inner join and outer join
read the following two links: http://www.programmerinterview.com/index.php/database-sql/difference-between-a-l…
Leetcode 88. Merge Sorted Array
Python 3 实现: 源代码已上传 Github,持续更新。 """ 88. Merge Sorted Array Given two sorted integer arrays nums1 and nums2, m…
"cannot resolve symbol R" in Android Studio
这个错误真的让我想弃用Android Studio, 解决办法是把程序里所有有R的地方先注释掉,然后 Build —> Make project,就好了。
验证大小中括号是否成对闭合匹配
验证大小中括号是否成对闭合匹配 Valid Parentheses 验证大小中括号是否成对闭合匹配。 Given a string containing just the characters ‘(̵…