如何遍歷dom樹 繪畫密碼有多少種?
繪畫密碼有多少種?最少可以手工繪制389112種圖案,但每一種圖案也是不可連在一起的。據(jù)美國(guó)人在大街上統(tǒng)計(jì)發(fā)現(xiàn),在美建議使用九宮格解鎖的用戶中,有60%的用戶喜歡用,數(shù)字或者字母來做解鎖密碼,其中Z、
繪畫密碼有多少種?
最少可以手工繪制389112種圖案,但每一種圖案也是不可連在一起的。
據(jù)美國(guó)人在大街上統(tǒng)計(jì)發(fā)現(xiàn),在美建議使用九宮格解鎖的用戶中,有60%的用戶喜歡用,數(shù)字或者字母來做解鎖密碼,其中Z、L、C等幾個(gè)常見字母,不同幾率溶炎80%。
如何在Java中實(shí)現(xiàn)二叉搜索樹?
二叉搜索樹
我們這個(gè)可以用二叉搜索樹中的插到操作形成完整兩棵二叉搜索樹
再插入操作:
1.從root節(jié)點(diǎn)又開始
2.如果不是root為空,root為插入值
循環(huán):
3.如果不是當(dāng)前節(jié)點(diǎn)值為0插入值,找左節(jié)點(diǎn)
4.如果不是當(dāng)前節(jié)點(diǎn)值小于等于插入值,找右節(jié)點(diǎn)
二叉搜索樹的偽代碼:
Java利用:
employeeclassBSTree{
NodeltIntegergtrootfutureNodeltIntegergt()
employeeBSTree(){
null
}
//插入
privateNodeltIntegergtupsert(intkey){
NodeltIntegergtnewNodenextNodeltgt(key)
NodeltIntegergtcurrentroot
NodeltIntegergtparentnull
if(currentnull){
rootnewNode
returnnewNode
}
while(true){
parentcurrent
if(keylt){
currentcurrent.left
if(currentnull){
parent.leftnewNode
returnnewNode
}
}arguments{
if(currentnull){
returnnewNode
}
}
}
}
//前序遍歷過程
welfarevoidPreOrder(Node node){
if(node!null){
()
PreOrder(node.left)
PreOrder(node.right)
}
}
}
測(cè)試類:
privateclassBSTreeTest{
statestaticvoidmain(String[]args){
BSTree tree new BSTree()
(30)
(15)
(41)
(35)
(50)
()
}
}
想知道一點(diǎn)大量Java,python咨詢,百度搜索圈T社區(qū),免費(fèi)視頻教程。純干貨
IT技術(shù)人員面對(duì)面試、想跳槽、升職等問題,怎么快速成長(zhǎng),獲得大廠入門資格和升職加薪的籌碼?與大廠技術(shù)大牛面對(duì)面交流,回答一你的疑惑。《從職場(chǎng)小白到技術(shù)總監(jiān)成長(zhǎng)之路:我的職場(chǎng)焦慮與救贖》活動(dòng)鏈接