摘要: 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 occurrenc 阅读全文
posted @ 2016-08-11 12:34 snakech 阅读(116) 评论(0) 推荐(0)
摘要: Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the or 阅读全文
posted @ 2016-08-11 12:08 snakech 阅读(169) 评论(0) 推荐(0)
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2016-08-10 19:36 snakech 阅读(174) 评论(0) 推荐(0)
摘要: Write a function to find the longest common prefix string amongst an array of strings. 大意就是,写一个函数可以找到一个数组字符串中的最长前缀。 分析: 最长前缀的最大值为数组字符串中长度最短的字符,由最短字符串由 阅读全文
posted @ 2016-08-10 19:13 snakech 阅读(153) 评论(0) 推荐(0)
摘要: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
posted @ 2016-08-10 18:15 snakech 阅读(237) 评论(0) 推荐(0)
摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return ["2 阅读全文
posted @ 2016-08-09 19:04 snakech 阅读(175) 评论(0) 推荐(0)
摘要: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 题目大意就是给一个字符串,得到倒序字符串 corner 阅读全文
posted @ 2016-08-09 12:50 snakech 阅读(133) 评论(0) 推荐(0)