import java.io.*; public class TestOutputStreamWriter{ public static void main(String[] args){ try{ OutputStreamWriter osw = new OutputStreamWriter(ne ...
分类:
其他好文 时间:
2020-03-03 11:09:12
阅读次数:
68
从尾到头打印链表 方法一: function printListFromTailToHead(head){//用数组的反转 const stack=[] let node=head while(node){ stack.push(node.val) node=node.next } return s ...
分类:
其他好文 时间:
2020-03-03 10:54:05
阅读次数:
71
stack: 栈,存放局部变量,有系统释放 heap: 堆, 存放动态分配的内存,有程序员自己手动释放。比如: int * p = (int * )malloc(4); free(p) 释放的是动态内存,p是局部变量,所以并未释放。 globle, 全局变量, 存放全局变量以及静态变量。有系统自动释 ...
分类:
其他好文 时间:
2020-03-03 00:56:33
阅读次数:
65
主要的报错信息 gyp ERR! build error gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1 请重新安装windows 编 ...
题目描述 输入一个链表,输出该链表中倒数第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 ...