Loading

上一页 1 2 3 4 5 6 7 8 ··· 24 下一页
摘要: 题目 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), ne... 阅读全文
posted @ 2019-02-26 17:05 李正浩 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 题目 代码/*// Definition for a Node.class Node {public: int val; Node* next; Node* random; Node() {} Node(int _val, Node* _next... 阅读全文
posted @ 2019-02-26 16:20 李正浩 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目 https://leetcode-cn.com/explore/learn/card/linked-list/197/conclusion/764/代码 /*// Definition for a Node.class Node {public: int val;... 阅读全文
posted @ 2019-02-26 15:54 李正浩 阅读(223) 评论(0) 推荐(0) 编辑
摘要: [System.Obsolete("这是一条提示信息,表示这个方法弃用了,使用此方法会有一条Warning信息")]private void SaveDataMessage(SaveMessage message){}在方法上方添加特性,即可,如果想要不允许通过编译,则需要在... 阅读全文
posted @ 2019-02-25 22:12 李正浩 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 题目设计链表的实现。您可以选择使用单链表或双链表。单链表中的节点应该具有两个属性:val 和 next。val 是当前节点的值,next 是指向下一个节点的指针/引用。如果要使用双向链表,则还需要一个属性 prev 以指示链表中的上一个节点。假设链表中的所有节点都是 0-in... 阅读全文
posted @ 2019-02-25 20:04 李正浩 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), ne... 阅读全文
posted @ 2019-02-25 19:36 李正浩 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), ne... 阅读全文
posted @ 2019-02-24 16:07 李正浩 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 typedef struct SingleList {public: int val; SingleList* next; };class MyLinkedList {public: /** Initialize your data struc... 阅读全文
posted @ 2019-02-24 15:29 李正浩 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目 代码class MinStack {public: /** initialize your data structure here. */ MinStack():nums(),sorted() { } void p... 阅读全文
posted @ 2019-02-23 22:08 李正浩 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: int numSquares(int n) { vector dp(n + 1, INT_MAX); dp[0] = 0; for (int i = 0; i <=... 阅读全文
posted @ 2019-02-23 18:50 李正浩 阅读(143) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 24 下一页