由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - a hash embedded with another hash in R (转载)
相关主题
microsoft fresh phd 一般能negotiate到多少EE VLSI想找firmware embeded,请帮忙
LCA of binary tree的一行CODE不懂。。leetcode上的,请牛牛指教,EE转CS,做embedded, 熟悉C,需要懂算法吗?
请问 如何找无序数组里第2大的数Google Onsite 面经
内推 Senior Engineer (Modeling / Optimization) Location SaEmbedded linux entry level position (转载)
updae: 明天GOOG电面, 求祝福 interview 问题G家店面
Facebook interview 面经问三道题
Bloomberg电话面经4sum的那道题
请教amazon面试题FB面经~
相关话题的讨论汇总
话题: hash话题: first话题: list1话题: h1话题: embedded
进入JobHunting版参与讨论
1 (共1页)
l******9
发帖数: 579
1
【 以下文字转载自 Statistics 讨论区 】
发信人: light009 (light009), 信区: Statistics
标 题: a hash embedded with another hash in R
发信站: BBS 未名空间站 (Fri Apr 11 15:56:40 2014, 美东)
This question is related to my previous question.
I need to design a hash that is embedded with another hash in R in Rstudio
on Win 7.
library(hash)
myf <- function()
{
h1 <- hash()
if (!has.key("first", h1))
{
list1 <- list()
h1.son<- hash()
h1.son["first_son"] <- list1
h1["first"] <- h1.son
}
# second check
if(!has.key("first_son", h1["first"]))
{
list1 <- list()
h1.son<- hash()
h1.son["first_son"] <- list1
h1["first"] <- h1.son
}
}
myf()
Why in "second check ", h1["first"] still has NO key of "first_son", which
has been added before.
Thanks !
1 (共1页)
进入JobHunting版参与讨论
相关主题
FB面经~updae: 明天GOOG电面, 求祝福 interview 问题
请教leetcode的gray codeFacebook interview 面经
Leetcode一题(非OJ)Bloomberg电话面经
贡献1个A家3面的面经,被老印坑了请教amazon面试题
microsoft fresh phd 一般能negotiate到多少EE VLSI想找firmware embeded,请帮忙
LCA of binary tree的一行CODE不懂。。leetcode上的,请牛牛指教,EE转CS,做embedded, 熟悉C,需要懂算法吗?
请问 如何找无序数组里第2大的数Google Onsite 面经
内推 Senior Engineer (Modeling / Optimization) Location SaEmbedded linux entry level position (转载)
相关话题的讨论汇总
话题: hash话题: first话题: list1话题: h1话题: embedded