Data Structure:array and list

array:
1.array can sotore data and even array
2.in some array,store actual data
while in some array, store the information that if it exists in another array
3.like: use a bit Vector to present a array(used in machone learning “minist”)
{1,2,3,4,5,6,7,8,9,0} so the array {1,4,7} was presents as
{1,0,0,1,0,0,1,0,0,0}

dict:
1.dict = {“key”:value} (dictionary stores key-value pairs)

serch function:
1.sequent search
2.Binary Search(折半搜索): as the list is sequent.1st skip to the mid of the list,
judge if its > or < the num we search for … …
two algorithm to reach it;
loop and recursion

tips:

unsigned right shift operator:[无符号右移运算]
a >> b; change a to binary type, and shift every 1or0 towards right b sites
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值