![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编程实现
sculxp
这个作者很懒,什么都没留下…
展开
-
js 用于计算
由于js中数字类型的限制:所有的数都是用64位浮点型来表示,没有无符号数,所以实现各类算法,比如编码、解码之类的可能都会有问题。 下面列举一些常规的操作: 最大的整数 2^53 - 1Number.MAX_SAFE_INTEGER 所有的位运算都会自动转为32位进行,所以注意溢出的问题 有符号数转无符号数 num >>> 0 有符号右移(算数右移) >>...原创 2019-12-28 15:05:18 · 95 阅读 · 0 评论 -
qt搭建最简单的开发环境
这里可以下载新版本的qthttp://download.qt.io/archive/qt/ 注意在details中选择中国镜像,速度很快。 可以不使用vs版本的库,而选择mingw,这样直接就已经有编译器了,不过5.14版本部署程序无法工作,需要手动部署。 用此法可以快速搭建开环环境,分分钟写出一个不错的本地程序,没有必要安装超大体积的vs。 手动部署也超简单: 除了拷贝常规的dll外...原创 2019-12-28 14:42:14 · 109 阅读 · 0 评论 -
Node.js搭建最简单的http rest服务
采用koa2搭建,代码如下: "use strict"; const Koa = require('koa2'); const app = new Koa(); const router = require('koa-router')(); const koaBody = require('koa-body'); router.get('/time', ctx => { ctx...原创 2019-12-28 12:48:58 · 159 阅读 · 0 评论 -
LeetCode | Two Sum
1题目 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the targ原创 2015-06-06 00:22:50 · 184 阅读 · 0 评论 -
LeetCode | Longest Substring Without Repeating Characters
题目 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3原创 2015-06-06 10:35:20 · 285 阅读 · 0 评论 -
LeetCode | Add Two Numbers
1题目 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it原创 2015-06-06 00:43:36 · 269 阅读 · 0 评论 -
LeetCode | Median of Two Sorted Arrays
题目 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). 解答 解法一 比较容易想到的就是将原创 2015-06-06 17:33:45 · 289 阅读 · 0 评论