Redian新闻
>
请问E-Verify不过怎办
avatar
请问E-Verify不过怎办# EB23 - 劳工卡
k*8
1
1. talk about your projects (more details were asked)
2. whats BST
3. how to implement BST(more specific details here)
4. how to identify an integer is a power of 2
5. Sort string a based on the order of the letters in string b.
For example: a = cat, b = tar, sorted = tac
All above took about 1 hour.
avatar
a*s
2
H1 transfer non pp file了还没收到receipt notice HR就让上班了,但HR file的
E-Verify没通过,打电话DHS要提供H1 transfer的receipt notice,8天内必须答复DHS
。律师说只要file了就可以工作,不用等receipt notice。
搞糊涂了,现在继续给新雇主工作合法吗?是不是只要等拿到receipt notice再发工资
就没事?DHS 的 E-Verify 只是告诉雇主结果,会有其他影响吗多谢!
avatar
g*j
3
最后一题怎么回答的啊?
可以不可以搞一个map,把字母和数字重新对应?
t - 1
a - 2
r - 3
然后 cat 就是421 排序之后,就是 124,然后再映射回来,就是tac啦?

【在 k**8 的大作中提到】
: 1. talk about your projects (more details were asked)
: 2. whats BST
: 3. how to implement BST(more specific details here)
: 4. how to identify an integer is a power of 2
: 5. Sort string a based on the order of the letters in string b.
: For example: a = cat, b = tar, sorted = tac
: All above took about 1 hour.

avatar
z*3
4
没懂lz的问题,不是everify的雇主也可以招h1b的
avatar
j*s
5
怎么得到phone interview的机会的?求指导啊。

【在 k**8 的大作中提到】
: 1. talk about your projects (more details were asked)
: 2. whats BST
: 3. how to implement BST(more specific details here)
: 4. how to identify an integer is a power of 2
: 5. Sort string a based on the order of the letters in string b.
: For example: a = cat, b = tar, sorted = tac
: All above took about 1 hour.

avatar
p*2
6

写一个comparator就可以了吧?

【在 g***j 的大作中提到】
: 最后一题怎么回答的啊?
: 可以不可以搞一个map,把字母和数字重新对应?
: t - 1
: a - 2
: r - 3
: 然后 cat 就是421 排序之后,就是 124,然后再映射回来,就是tac啦?

avatar
g*j
7
是的
但是comparator里面如何定义俩字母的相对大小呢?

【在 p*****2 的大作中提到】
:
: 写一个comparator就可以了吧?

avatar
r*i
8
确实要搞个map,把字母映射到出现的位置,然后再用comparator就可以了。问题是如
果a和b不同字母的个数多于一个的话,这种映射是不是会有二义性啊?

【在 g***j 的大作中提到】
: 是的
: 但是comparator里面如何定义俩字母的相对大小呢?

avatar
e*e
9
IMHO, the limitation of this question is b shouldn't have dups.
public String sort(String input, String order) {
Map map = new LinkedHashMap(
);

for ( int i = 0; i < order.length(); i++ )
map.put( order.charAt( i ), 0 );

for ( int i = 0; i < input.length(); i++ ) {
char c = input.charAt( i );
if ( map.containsKey( c ) )
map.put( c , map.get(c) + 1 );
else
map.put( c , 1 );
}

StringBuffer sb = new StringBuffer();
for ( Map.Entry entry : map.entrySet() ) {
for ( int i = 0; i < entry.getValue(); i++ )
sb.append( entry.getKey() );
}

return sb.toString();
}

【在 r*****i 的大作中提到】
: 确实要搞个map,把字母映射到出现的位置,然后再用comparator就可以了。问题是如
: 果a和b不同字母的个数多于一个的话,这种映射是不是会有二义性啊?

avatar
k*r
10
avatar
F*9
11
comparator, 加个构造函数参数。
char array[26] = {0};
i = 0;
for c in str:
array[c] = ++i;
重载operator(),直接查值就行了,不用散列那么麻烦。

【在 r*****i 的大作中提到】
: 确实要搞个map,把字母映射到出现的位置,然后再用comparator就可以了。问题是如
: 果a和b不同字母的个数多于一个的话,这种映射是不是会有二义性啊?

avatar
c*m
12
赞!
预祝你过两天的M电面顺利
avatar
l*a
13
顺序怎么定的,没看懂
另外如果支持大小写怎么办,支持unicode怎么办?支持无穷大字符集怎么办?

【在 F********9 的大作中提到】
: comparator, 加个构造函数参数。
: char array[26] = {0};
: i = 0;
: for c in str:
: array[c] = ++i;
: 重载operator(),直接查值就行了,不用散列那么麻烦。

avatar
d*s
14
Thanks!

【在 k**8 的大作中提到】
: 1. talk about your projects (more details were asked)
: 2. whats BST
: 3. how to implement BST(more specific details here)
: 4. how to identify an integer is a power of 2
: 5. Sort string a based on the order of the letters in string b.
: For example: a = cat, b = tar, sorted = tac
: All above took about 1 hour.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。