
LeetCode刷题
goforitaaa
这个作者很懒,什么都没留下…
展开
-
石头和珠宝
LeetCode 刷题问题描述解决代码: public static int numJewelsInStones(String J, String S) { int K = 0,m = 0;int l=0;int ln = 0; int num = 0; int result =0; int jlenth = J.length(); int slenth = S....原创 2018-07-06 22:04:01 · 238 阅读 · 0 评论 -
Leetcode刷题
public class Solution { public ListNode removeElements(ListNode head, int val) { ListNode dummyhead = new ListNode(-1); dummyhead.next =head; ListNode re...原创 2018-09-17 21:31:30 · 121 阅读 · 0 评论 -
Leetcode
对于上次这个问题Remove all elements from a linked list of integers that have value val.Example:Input: 1->2->6->3->4->5->6, val = 6Output: 1->2->3->4->5这次我们用递归 publ...原创 2018-09-19 19:05:47 · 115 阅读 · 0 评论 -
Leetcode
700. Search in a Binary Search TreeGiven the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node's value equals the given value. Return the subtre...原创 2018-10-02 19:00:15 · 112 阅读 · 0 评论