没有合适的资源?快使用搜索试试~ 我知道了~
leetcode伪代码-convert-binary-number-in-a-linked-list-to-integer:将链...
共4个文件
go:2个
gitignore:1个
md:1个
需积分: 9 0 下载量 201 浏览量
2021-06-30
19:58:32
上传
评论
收藏 4KB ZIP 举报
温馨提示
leetcode伪代码convert-binary-number-in-a-linked-list-to-integer 题目解读: 题目来源: 原文: Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of a number. Return the decimal value of the number in the linked list. 解读: 给定一个链节串列的起始节点head 每个串列节点的值都是0或是1 代表二元数的位元 举例来说就是1->0->1 => b101 = 1* 2^2+ 0* 2^1 + 1* 2^0 = 4 + 0 + 1 =5 求解每个链节串列所代表的10进制的值 初步解法: 初步观察: 首先这个链节串列是从最高的digits往后排 因此无法直接递加 递加必须等到走完所
资源推荐
资源详情
资源评论
收起资源包目录
convert-binary-number-in-a-linked-list-to-integer-master.zip (4个子文件)
convert-binary-number-in-a-linked-list-to-integer-master
getDecimalValue_test.go 1KB
.gitignore 269B
README.md 3KB
getDecimalValue.go 346B
共 4 条
- 1
资源评论
weixin_38621624
- 粉丝: 3
- 资源: 900
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功