摘要: 9. Palindrome Number (c++)Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backwar... 阅读全文
posted @ 2018-08-27 10:06 Ruohua3kou 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 2. Add Two Numbers (c++) You are given two non-empty linked lists representing two non-negative integers. The digits are stored... 阅读全文
posted @ 2018-08-27 09:42 Ruohua3kou 阅读(123) 评论(0) 推荐(0) 编辑
摘要: // 解决哲学家就餐问题// 每个哲学家可用一个线程来模拟。// 设有5个哲学家,5只筷子,每个哲学家吃饭时间为一个随机值,哲学家吃饭后的思考时间也是一个随机值。#include <Windows.h>#include <iostream>#include <cstdio>#include <std 阅读全文
posted @ 2018-04-09 10:41 Ruohua3kou 阅读(2385) 评论(0) 推荐(0) 编辑
摘要: 创建环境 环境创建之后,会自动进入该目录,并激活该环境。 切换环境 列出已有环境 退出环境 删除环境 创建project 阅读全文
posted @ 2018-04-09 09:37 Ruohua3kou 阅读(89) 评论(0) 推荐(0) 编辑
摘要: --内容整理自廖雪峰的GIT教程-- git status 查看当前工作区状态,显示未跟踪的文件以及未上传的修改记录 git init 使当前文件夹变成Git可以管理的仓库 git add xxx 将xxx添加到仓库 git commit -m "注释" 将修改提交,同时注释 git diff xx 阅读全文
posted @ 2018-04-08 21:12 Ruohua3kou 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 通过ln命令创建软连接实现 echo $PATH 查看路径 例 我的路径是: /home/rh/anaconda3/bin:/home/rh/bin:/home/rh/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin 阅读全文
posted @ 2018-04-08 08:53 Ruohua3kou 阅读(5212) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2018-04-03 12:08 Ruohua3kou 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2018-04-03 11:07 Ruohua3kou 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2018-04-02 23:50 Ruohua3kou 阅读(276) 评论(0) 推荐(0) 编辑
摘要: list=[num for row in nums for num in row] 阅读全文
posted @ 2018-04-01 10:49 Ruohua3kou 阅读(443) 评论(0) 推荐(0) 编辑