/* * 378. Find the kth smallest number in at row and column sorted matrix. */ public class KthSmallest { publi…
分类:LeetCode
LeetCode刷题之Climbing Stairs
Problem You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 …
[LeetCode By Go 46]100. Same Tree
题目 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered…
LeetCode 290 单词形式 JS完成
给定一种 pattern(形式) 和一个字符串 str ,推断 str 是不是遵照雷同的形式。 这里的遵照指完整婚配,比方, pattern 里的每一个字母和字符串 str 中的每一个非空单词之间存在着双向衔接的对应形式…
[LeetCode] Ones and Zeroes 一和零
In the computer world, use restricted resource you have to generate maximum benefit is what we al…
LeetCode | Word Break
题目: Given a string s and a dictionary of words dict, determine if s can be segmented …
LeetCode 264 Ugly Number II
题目描述 Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only …
LeetCode 150 Evaluate Reverse Polish Notation
题目描述 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /…
LeetCode | Add Binary(二进制相加)
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Ret…
leetcode 算法题解之 Divide Two Integers
问题描述 Divide two integers without using multiplication, division and mod operator. If it is overflow, return MA…
18. 四数之和(Swift版)
一、题目 给定一个包含 n 个整数的数组 nums 和一个目标值 target,判断 nums 中是否存在四个元素 a,b,c 和 d ,使得 a + b + c + d 的值与 target 相等?找出所有满足条件且不…
[剑指offer] 第一个只出现一次的字符
本文首发于我的个人博客:尾尾部落 题目描述 在一个字符串(0<=字符串长度<=10000,全部由字母组成)中找到第一个只出现一次的字符,并返回它的位置, 如果没有则返回 -1. 解题思路 先在hash表中统计…