2017年4月11日

剑指offer : 二维数组中的查找

摘要: 题目描述 在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。这道题方法其实有很多种,很多人第一思路就是暴力搜索,如下所示:class Solution {public... 阅读全文

posted @ 2017-04-11 23:23 gechen 阅读(103) 评论(0) 推荐(0) 编辑

LeetCode : Valid Parentheses

摘要: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close... 阅读全文

posted @ 2017-04-11 21:23 gechen 阅读(105) 评论(0) 推荐(0) 编辑

LeetCode : Isomorphic Strings

摘要: Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All oc... 阅读全文

posted @ 2017-04-11 20:33 gechen 阅读(75) 评论(0) 推荐(0) 编辑

导航