
算法
wide288
头脑的清醒更有利于高级思维的活动。
展开
-
读论文:ISIA Food-500 一个大型食品识别数据集通过堆叠的全球本地网络
更新日期:2021-2-7 美团参与编写的论文 一个大规模的食品图像本地识别的算法,以及为算法提供基准的数据集。 数据集:ISIA Food-500 其中 500 个类别来自维基百科 论文中出现的网址不可访问:http://123.57.42.89/FoodComputimg-Dataset/ISIA-Food500.html 美团研究食品识别是对口的,但不知道是原生的食材还是做好的熟食? 答:从文中图像可知是熟食。 挑战 缺乏数据集 在食物图像的整体外...原创 2021-02-07 11:04:33 · 1070 阅读 · 1 评论 -
数据结构 - 向量简单介绍
完成第一版了解数据结构概念和常用方法。 待做第二版常用方法的实现。 向量:存储同一种类型数据的一维数组。 向量和列表(list)属于序列。 向量是对数组的扩展。 通常将序列的下标称为秩(Rank) 向量分为有序和无序。 向量的数组的优缺点: 1、查找某位置的的元素是O(1)阶的,因为数组嘛例如a[1]; 2、插入元素的代价是巨大的,最坏的情况是插到最前面,需要将原数组中的所有元素向后移动。O(n); 3、删除一样花费巨大。O(n); 4、对于插入删除元素在末尾时,这种情况是..原创 2020-08-20 11:35:50 · 3054 阅读 · 0 评论 -
数据结构 - 优先级队列
底层是用堆来实现。 1,按排序规则,从高优先级向低优先级取数据。 2,插入数据 3,获取最高优先级数据后,删除最高优先级数据。 golang 的优先级队列实现: https://github.com/facebookarchive/pqueue 文档: https://godoc.org/github.com/facebookgo/pqueue 参考 《STL源码剖析》,https://blog.youkuaiyun.com/MBuger/article/details/70665397 ..原创 2020-08-08 16:32:12 · 172 阅读 · 0 评论 -
leetcode 2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i原创 2017-06-13 14:18:04 · 333 阅读 · 0 评论 -
leetcode 1, Two Sum
比起写代码,更难的是读懂题。 我读了几次,参考了许多同学的答案(没有人写题的中文翻译,只好逆推。) 题意翻译为: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each inpu原创 2017-06-12 15:38:41 · 277 阅读 · 0 评论 -
画扑克牌的 JS 库
http://tairraos.github.io/Poker.JS/#chinese-version-readme 可是 img , canvas, png 可以在基础上写个游戏了。进行一下封装。 如全局变量:所有牌的颜色,花色,大小 基础信息。 分出的牌值和花色。 没分出的牌值和花色。 规则定义,最好写到一个大的全局数组中,这样,只要写出规则就相当于变一个游戏。原创 2015-11-26 15:12:45 · 1402 阅读 · 0 评论 -
中国象棋编程的网站
http://www.xqbase.com/index.htm转载 2015-02-26 14:51:29 · 799 阅读 · 0 评论 -
172 Factorial Trailing Zeroes 过了。英文真不好读啊。
package com.x.xyz; public class HelloWorld { public static void main(String[] args) { System.out.println("Star !"); System.out.println(trailingZeroes(10)); System.out.println(trailingZeroes(1原创 2014-12-30 18:52:33 · 3577 阅读 · 0 评论 -
Factorial Trailing Zeroes , 172题,可能是我没读清楚,还报错。
package com.x.xyz; public class HelloWorld { public static void main(String[] args) { System.out.println("Star !"); System.out.println(trailingZeroes(0)); System.out.println(trailingZeroes(1)原创 2014-12-30 18:26:29 · 1513 阅读 · 0 评论 -
leetcode 171 Excel Sheet Column Title
function getInt2 ($ch) { echo $ch; echo ""; $ci = strlen($ch); $sum = 0; for($j=0,$i=$ci-1; $j<$ci; $j++, $i--) { $t = ord( substr($ch, $i, 1) ) - 64; $sum += pow(26, $j) * $t; } echo原创 2015-01-12 11:18:48 · 775 阅读 · 0 评论 -
leetCode 169 [PHP代码]
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element原创 2015-01-27 11:38:49 · 1503 阅读 · 0 评论 -
PHP 帕斯卡(Pascal)三角形
帕斯卡(Pascal)三角形基本上就是在解 nCr ,因为三角形上的每一个数字各对应一个nCr,其中 n 为 row,而 r 为 column,如下: 0C0 1C0 1C1 2C0 2C1 2C2 3C0 3C1 3C2 3C3 4C0 4C1 4C2 4C3 4C4 对应的数据如下图所示: define ("N", 1原创 2014-03-18 17:24:35 · 951 阅读 · 1 评论 -
快速排序算法
http://github.tiankonguse.com/blog/2014/11/14/qsort/转载 2014-11-24 17:35:14 · 678 阅读 · 0 评论 -
如何根据传感器实时采集的数据计算出前进后退侧移下蹲等动作,并且能够估算出速度,算法
遇到一个好问题。现在做穿戴式设备的多。我没去写过相应的程序。但原理是了解一些的。 问: 1.在大腿上绑定一个9轴姿态传感器 2.根据传感器实时采集的数据计算出前进后退侧移下蹲等动作,并且能够估算出速度,可以有误差 答: 有这么多轴的吗?只知道三轴的,相反方向是运动方向。多轴的相反方向。组合计算相位角度和力度,就是方向和速度了。 要是想考虑人体角度 和动作,就要考虑人体解剖学了原创 2014-11-21 12:04:49 · 2612 阅读 · 0 评论