题目描述 输入一个链表,输出该链表中倒数第k个结点。 题解一:栈 1 public static ListNode FindKthToTail(ListNode head,int k) { 2 if(head==null||k<=0){ 3 return null; 4 } 5 Stack<List ...
分类:
其他好文 时间:
2020-03-02 15:05:27
阅读次数:
64
1. Description: Notes: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-05-07 3 * Your MyStack object will be instantiated and called ...
分类:
编程语言 时间:
2020-03-02 14:58:48
阅读次数:
75
1. Description: 2. Examples: 3.Solutions: 1 /** 2 * Created by sheepcore on 2019-05-07 3 * Your MinStack object will be instantiated and called as suc ...
分类:
编程语言 时间:
2020-03-02 14:56:29
阅读次数:
79
import java.io.*; public class TestFileOutputStream{ public static void main(String[] args){ try{ FileOutputStream out = new FileOutputStream("D:/Java ...
分类:
其他好文 时间:
2020-03-02 13:03:34
阅读次数:
55
0、题目描述 输入一个链表的头结点,从尾到头反过来打印出每个节点的值。 1、解法 用栈即可。 class Solution { public: vector printListFromTailToHead(ListNode* head) { stack step; vector ans; ListN... ...
分类:
其他好文 时间:
2020-03-02 12:52:06
阅读次数:
58
using System; namespace Demo { class Program { static void Main(string[] args) { try { BLLLayer(); } catch (Exception ex) { Console.WriteLine(ex.Stack ...
题目描述 输入一个链表,反转链表后,输出新链表的表头。 题解一:栈 1 public static ListNode ReverseList(ListNode head) { 2 if(head==null||head.next==null){ 3 return head; 4 } 5 Stack< ...
分类:
其他好文 时间:
2020-03-02 00:33:49
阅读次数:
66
$\color{red}{也许你也在看了《如何5分钟搭建自己的博客》后觉得:哇塞太方便了我也要试一试!}$ $\color{blue}{然后你像我一样下载了Gridea}$ $\color{DarkOrchid}{然而,经过了重重筛选,你觉得原本の三个主题都太丑了。}$ $\color{DarkOr ...
分类:
其他好文 时间:
2020-03-01 21:51:13
阅读次数:
221
Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎,能够解决不断涌现出的各种用例。 作为 Elastic Stack 的核心,它集中存储您的数据,帮助您发现意料之中以及意料之外的情况。 导入依赖 <dependency> <groupId>junit</groupId ...
分类:
其他好文 时间:
2020-03-01 21:30:25
阅读次数:
68
传送门:https://abc091.contest.atcoder.jp/tasks/arc092_a?lang=en 题目:On a two-dimensional plane, there are N red points and N blue points. The coordinates ...
分类:
其他好文 时间:
2020-03-01 20:17:00
阅读次数:
104