- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 Remove Linked List Elements
题目描述Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --> 3 --> 4 --> 5解题思路1 当为空链表时
2015-05-17 16:13:23 281
原创 Java中switch的判断类型
package com.larry.test;enum Enum{ RED, BLUE}public class Test1 { public static void main(String[] args) { char c = 0; byte b = 0; short s = 0; int i = 0; long l = 0;// switch (Enum.R
2015-05-17 11:59:22 1705
原创 Reverse Linked List
题目描述Reverse a singly linked list.题目出处:https://leetcode.com/problems/reverse-linked-list/解题思路用一个辅助的List,然后逆序代码package com.larry.easy;import java.util.ArrayList;import java.util
2015-05-17 11:23:18 201
原创 Count Primes
题目描述Description:Count the number of prime numbers less than a non-negative number, n题目出处:https://leetcode.com/problems/count-primes/题目分析给定一个正数,找出小于该数的所有质数代码package com.larr
2015-05-16 21:54:16 256
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人