![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
搬砖的wqq
这个作者很懒,什么都没留下…
展开
-
328. Odd Even Linked List
此题主要是考查链表。 语言:java/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */ public class Solution { pu原创 2016-02-01 18:46:45 · 280 阅读 · 0 评论 -
Leetcode:344. Reverse String
题目描述: Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.Subscribe to see which companies asked this question我的AC代码:public class原创 2016-04-26 15:43:58 · 248 阅读 · 0 评论 -
Leetcode:345. Reverse Vowels of a String
此题很简单,但是本宝宝的却把它做复杂了。后面有时间会改进的。import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; public class Solution { public String reverseVowels(String s) { char[] a=s原创 2016-04-26 15:34:22 · 259 阅读 · 0 评论 -
Leetcode:343. Integer Break
题目描述: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, r原创 2016-04-26 16:35:36 · 250 阅读 · 0 评论 -
leetcode 35. Search Insert Position
java 实现public class Solution { public int searchInsert(int[] nums, int target) { int len=nums.length; int k=0; if(len==0){ return 0; } for(int i=原创 2017-02-13 20:55:01 · 172 阅读 · 0 评论 -
leetcode 11. Container With Most Water
java 实现 题目: Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0)原创 2017-02-14 21:50:45 · 186 阅读 · 0 评论