- 博客(28)
- 收藏
- 关注
原创 数据结构算法操作试题(C++/Python)——字符串相乘
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/multiply-strings/2. 解答进位相乘 python: 564ms, 11.8mbclass Solution(object): ...
2019-03-28 22:08:41 606
原创 数据结构算法操作试题(C++/Python)——有效的数独
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/valid-sudoku/submissions/2. 解答python: 272ms, 11.9mbclass Solution(object): ...
2019-03-25 22:04:27 862
原创 数据结构算法操作试题(C++/Python)——加一
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/plus-one/2. 解答python: 28ms, 10mb, 87%方法一:class Solution(object): def pl...
2019-03-21 21:05:33 553
原创 Linux查看CUDA版本以及cudnn版本号
文章目录1. 查看CUDA版本2. 查看cudnn版本1. 查看CUDA版本方法1: 查看文件cat /usr/local/cuda/version.txt方法2: 命令nvcc --version2. 查看cudnn版本cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2输出如下:(图中版本...
2019-03-21 18:59:12 45493 4
原创 Linux下查看NVIDIA的GPU使用情况
文章目录查看命令查看命令Nvidia自带了一个nvidia-smi的命令行工具,会显示GPU使用情况:$ nvidia-smi出现如下图:
2019-03-21 18:53:26 5127
原创 数据结构算法操作试题(C++/Python)——最长有效括号
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/longest-valid-parentheses/2. 解答python:56ms, 12.7MB, 50%class Solution(object):...
2019-03-20 23:32:21 632
原创 数据结构算法操作试题(C++/Python)——两两交换链表中的节点
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/swap-nodes-in-pairs/submissions/2. 解答python:24ms,10.7MB, 99.03%class Solution(...
2019-03-20 11:47:02 526
原创 数据结构算法操作试题(C++/Python)——最大子序和
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/maximum-subarray/2. 解答class Solution(object): def maxSubArray(self, nums):...
2019-03-20 11:46:51 525
原创 数据结构算法操作试题(C++/Python)——目录
数据结构操作试题(C++/Python)——目录数据结构操作试题(C++/Python)——二叉树的最小深度
2019-03-20 11:46:40 1346
原创 数据结构算法操作试题(C++/Python)——四数之和
文章目录1. 题目2. 解答解法1: 排序,双指针夹逼解法2: HashMap数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/4sum/2. 解答解法1: 排序,双指针夹逼python:656 ms,10.8 MBclass So...
2019-03-20 11:46:13 547 3
原创 数据结构算法操作试题(C++/Python)——在排序数组中查找元素的第一个和最后一个位置
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/2. 解答python: 28ms, 12mb...
2019-03-19 21:31:30 734
原创 数据结构算法操作试题(C++/Python)——搜索旋转排序数组
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/search-in-rotated-sorted-array/2. 解答python: 24ms, 11mbclass Solution(object):...
2019-03-18 22:31:18 504
原创 数据结构算法操作试题(C++/Python)——最后一个单词的长度
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/length-of-last-word/2. 解答python: 24ms, 10.9mb, 99.6%class Solution(object): ...
2019-03-17 23:22:10 511
原创 数据结构算法操作试题(C++/Python)——报数
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/count-and-say/2. 解答python: 20ms, 10.8mb, 97%class Solution(object): def co...
2019-03-16 16:37:54 516
原创 数据结构算法操作试题(C++/Python)——搜索插入位置
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/search-insert-position/2. 解答python:24ms, 10.9MB, 99%class Solution(object): ...
2019-03-14 22:06:30 524
原创 数据结构算法操作试题(C++/Python)——下一个排列
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/next-permutation/2. 解答python:60ms, 10.7mbclass Solution(object): def nextP...
2019-03-13 22:52:16 549
原创 拉格朗日乘子法
文章目录0. 前言1. 最优化问题2. 拉格朗日乘子法2.1 最短距离2.2 拉格朗日乘子法0. 前言// 可直接跳过本小节以支持向量积(Support Vector Machine, SVM) 的基本型引入拉格朗日乘子法(Lagrange Multipliers).min12∥ω∥2s.t. yi(ωTxi+b)⩾1, i=1,2,…,m....
2019-03-13 01:09:24 1291
原创 数据结构算法操作试题(C++/Python)——串联所有单词的子串
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/substring-with-concatenation-of-all-words/2. 解答python:244ms, 11.3 MB, 70%class...
2019-03-12 22:26:24 634
原创 数据结构算法操作试题(C++/Python)——两数相除
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/divide-two-integers/2. 解答python: 36ms, 10.8MBclass Solution(object): def divi...
2019-03-12 19:30:28 576
原创 数据结构算法操作试题(C++/Python)——实现strStr()
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/implement-strstr/submissions/2. 解答python: 36ms, 10.8MBclass Solution(object):...
2019-03-10 23:14:17 503
原创 数据结构算法操作试题(C++/Python)——移除元素
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/remove-element/2. 解答python: 28MS, 10.7MBclass Solution(object): def remove...
2019-03-10 23:11:59 597
原创 数据结构算法操作试题(C++/Python)——k个一组翻转链表
文章目录1. 题目2. 解答2.1 K步距普通解法2.2 递归数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/reverse-nodes-in-k-group/2. 解答2.1 K步距普通解法python:732ms, 12.4 M...
2019-03-10 22:43:23 591
原创 数据结构算法操作试题(C++/Python)——删除排序数组中的重复项
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/submissions/2. 解答python: 56ms, 12.7MB, 98.0...
2019-03-10 22:28:32 537
原创 数据结构算法操作试题(C++/Python)——合并K个排序链表
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/merge-k-sorted-lists/submissions/2. 解答python:sort 104ms, 19.1M, 46.78%class So...
2019-03-05 23:31:56 599
原创 数据结构算法操作试题(C++/Python)——括号生成
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/generate-parentheses/submissions/2. 解答递归python:32ms, 10MB, 92.65%class Solut...
2019-03-04 23:26:03 536
原创 数据结构算法操作试题(C++/Python)——合并两个有序链表
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/merge-two-sorted-lists/submissions/2. 解答python:48 ms, 10.8 MBclass Solution(ob...
2019-03-02 17:26:25 646
原创 数据结构算法操作试题(C++/Python)——有效的括号
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/valid-parentheses/submissions/2. 解答stackpython: 44 ms, 10.8 MBclass Solution...
2019-03-02 14:11:33 555
原创 数据结构算法操作试题(C++/Python)——删除链表的倒数第N个节点
文章目录1. 题目2. 解答数据结构算法操作试题(C++/Python):数据结构算法操作试题(C++/Python)——目录1. 题目leetcode 链接:https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/comments/2. 解答使用双指针p1,p2 ,p1先走n 步长,然后p1,p2同时开始...
2019-03-02 13:23:02 581
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人