上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 32 下一页
摘要: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". Write a function that takes 阅读全文
posted @ 2019-04-09 17:06 MarkLeeBYR 阅读(83) 评论(0) 推荐(0)
摘要: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 和415的解法一样 class Solution { public String a 阅读全文
posted @ 2019-04-09 16:42 MarkLeeBYR 阅读(73) 评论(0) 推荐(0)
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2019-04-09 16:42 MarkLeeBYR 阅读(93) 评论(0) 推荐(0)
摘要: Write a function to find the longest common prefix string amongst an array of strings. class Solution { public String longestCommonPrefix(String[] str 阅读全文
posted @ 2019-04-09 16:39 MarkLeeBYR 阅读(114) 评论(0) 推荐(0)
摘要: Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2019-04-09 16:37 MarkLeeBYR 阅读(100) 评论(0) 推荐(0)
摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
posted @ 2019-04-09 16:36 MarkLeeBYR 阅读(116) 评论(0) 推荐(0)
摘要: Input: version1 = "0.1", version2 = "1.1" Output: -1 Input: version1 = "7.5.2.4", version2 = "7.5.3" Output: -1 public int compareVersion(String versi 阅读全文
posted @ 2019-04-09 16:35 MarkLeeBYR 阅读(105) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome. public class Solution { public boolean isPalindrome(ListNode head) { ListNode fast = head 阅读全文
posted @ 2019-04-09 16:31 MarkLeeBYR 阅读(93) 评论(0) 推荐(0)
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
posted @ 2019-04-09 16:31 MarkLeeBYR 阅读(130) 评论(0) 推荐(0)
摘要: ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --> 3 --> 4 --> 5 ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val 阅读全文
posted @ 2019-04-09 16:30 MarkLeeBYR 阅读(120) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 32 下一页