![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
smile_fantastic
这个作者很懒,什么都没留下…
展开
-
春招100天——第五天11.15
今日题目1、最长递增子序列方法:动态规划import java.util.*;public class Solution { /** * retrun the longest increasing subsequence * @param arr int整型一维数组 the array * @return int整型一维数组 */ public int[] LIS (int[] arr) { int[] d.原创 2020-11-23 20:37:27 · 88 阅读 · 0 评论 -
春招100天——第四天11.14
今日题目1、链表相加import java.util.*;/* * public class ListNode { * int val; * ListNode next = null; * } */public class Solution { /** * * @param head1 ListNode类 * @param head2 ListNode类 * @return ListNode类 */原创 2020-11-21 12:16:35 · 68 阅读 · 0 评论 -
春招100天——第三天11.13
1、链表每k组反转import java.util.*;/* * public class ListNode { * int val; * ListNode next = null; * } */public class Solution { /** * * @param head ListNode类 * @param k int整型 * @return ListNode类 */ public ...原创 2020-11-15 10:29:10 · 83 阅读 · 0 评论 -
春招100天——第二天11.12
今日题目1、寻找数组中第K大的数import java.util.*;public class Finder { public int findKth(int[] a, int n, int K) { // write code here quickSort(a,0,n-1,K); return a[K-1]; } public void quickSort(int[] arr,int start,int end,i原创 2020-11-14 16:53:32 · 59 阅读 · 0 评论 -
春招100天——第一天11.11
1、反转链表/*public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; }}*/public class Solution { public ListNode ReverseList(ListNode head) { ListNode pre=null; ListNode c..原创 2020-11-14 13:11:01 · 75 阅读 · 0 评论 -
【LeetCode-面试算法经典-Java实现】【203-Remove Linked List Elements(删除单链表中的元素)】
原题 Remove all elements from a linked list of integers that have value val. Example Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6 Return: 1 --> 2 --> 3 -->...转载 2018-10-31 21:06:10 · 155 阅读 · 0 评论 -
【LeetCode-Java】Word Search
【题目】Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertic...原创 2018-10-31 21:15:20 · 157 阅读 · 0 评论