Redian新闻
>
h1b renew被rfe, uscis这是怎么了
avatar
h1b renew被rfe, uscis这是怎么了# EB23 - 劳工卡
h*g
1
说是有一个string, ABBFKCEDG; 还有一个reference string BAC
说是要把第一个string里的字母按照reference string里字母的顺序进行排序(没有出
现在reference string里的字母按原来的顺序写在后面),有什么比较好的办法?
for example, the first string should output at
BBACFKEDG
avatar
s*r
2
140等啊等, nsc 几个月了, 木有消息.
LD的h1b renew , 六个月后rfe, 让证明职位需要job requirement上写的学历, 怎么证
明, 这是renew啊, 啥都没变, 上次批了, 这次要推翻自己上次的判断?
我自己的h1b renew, 交了三个月后rfe, 说我用了超过6年了, 连律师都和我double
confirm 我h1b首次开始时间, 觉得不可思议, 2008开始的啊, 连时间都算错...
avatar
j*r
3
1. write a comparator function for character comparison according to the
reference string. This comparator will be used in partition function of sort.
2. quicksort
avatar
f*u
4
这样才能证明他们干活了
avatar
g*s
5
1. put the strings into a linked char list.
2. scan the char list and remove & count the chars which in reference
string. O(n)
3. sort based on the counted result. O(m lgm) m is the length of the
reference string
4. add the reference chars at the beginning of the list based on the
sorted result.
【在 h*****g 的大作中提到】
: 说是有一个string, ABBFKCEDG; 还有一个reference string BAC
: 说是要把第一个string里的字母按照reference string里字母的顺序进行排序(没有出
: 现在reference string里的字母按原来的顺序写在后面),有什么比较好的办法?
: for example, the first string should output at
: BBACFKEDG

avatar
r*u
6
而且他们更希望你PP
avatar
g*s
7
quicksort is not a stable sort.

sort.

【在 j***r 的大作中提到】
: 1. write a comparator function for character comparison according to the
: reference string. This comparator will be used in partition function of sort.
: 2. quicksort

avatar
i*7
8
我的H1B就是同一个公司换地点,从TX到CA,律师file了,然后5个月后收到rfe,说要
补交500+1500 dollar!说是应该是当作新公司申请。
现在的USCIS就是就是抢钱啊。。公司名字都一样啊。就是内部换个工作地点。。。

【在 s***r 的大作中提到】
: 140等啊等, nsc 几个月了, 木有消息.
: LD的h1b renew , 六个月后rfe, 让证明职位需要job requirement上写的学历, 怎么证
: 明, 这是renew啊, 啥都没变, 上次批了, 这次要推翻自己上次的判断?
: 我自己的h1b renew, 交了三个月后rfe, 说我用了超过6年了, 连律师都和我double
: confirm 我h1b首次开始时间, 觉得不可思议, 2008开始的啊, 连时间都算错...

avatar
r*y
9
step 2 怎么是 O(n) ? 应该是 O(kn)吧,k是reference string 的size

【在 g***s 的大作中提到】
: 1. put the strings into a linked char list.
: 2. scan the char list and remove & count the chars which in reference
: string. O(n)
: 3. sort based on the counted result. O(m lgm) m is the length of the
: reference string
: 4. add the reference chars at the beginning of the list based on the
: sorted result.
avatar
F*n
10
去年6月H1B renew到现在还在initial review的飘过

【在 s***r 的大作中提到】
: 140等啊等, nsc 几个月了, 木有消息.
: LD的h1b renew , 六个月后rfe, 让证明职位需要job requirement上写的学历, 怎么证
: 明, 这是renew啊, 啥都没变, 上次批了, 这次要推翻自己上次的判断?
: 我自己的h1b renew, 交了三个月后rfe, 说我用了超过6年了, 连律师都和我double
: confirm 我h1b首次开始时间, 觉得不可思议, 2008开始的啊, 连时间都算错...

avatar
m*q
11
A in-place string sorting method inspired by your idea:
1. partition the string - the left part contains chars
which appears in reference string, the right part contains
the rest chars. At the same time, count the chars appeared
in reference string. O(n)
2. overwrite the original string from the beginning, as
we already have the counters calculated in step 1. The
result is the left part is overwritten with chars with
the correct order, and the right part remains unchanged
from step 1. O(k) while k is the length of left part.
The advantage is it doesn't require additional linked list
which occupies O(n) space.

【在 g***s 的大作中提到】
: 1. put the strings into a linked char list.
: 2. scan the char list and remove & count the chars which in reference
: string. O(n)
: 3. sort based on the counted result. O(m lgm) m is the length of the
: reference string
: 4. add the reference chars at the beginning of the list based on the
: sorted result.
avatar
s*l
12
我的也是renewal,8月底就交了,一月初来了RFE,等拿到信,说是我没有quota,拟玛
我是renew,又不是新申请。律师估计心里和我一样,千万匹草泥马在奔腾,但是告诉
我的版本是写信给USCIS politely的指出他们的错误,结果几天后就批了。WAC的。

【在 s***r 的大作中提到】
: 140等啊等, nsc 几个月了, 木有消息.
: LD的h1b renew , 六个月后rfe, 让证明职位需要job requirement上写的学历, 怎么证
: 明, 这是renew啊, 啥都没变, 上次批了, 这次要推翻自己上次的判断?
: 我自己的h1b renew, 交了三个月后rfe, 说我用了超过6年了, 连律师都和我double
: confirm 我h1b首次开始时间, 觉得不可思议, 2008开始的啊, 连时间都算错...

avatar
m*q
13
Create an array for all possible chars, e.g. if don't consider
unicode stuff, there are 256 total chars. Initialize the array,
entries which appear in reference string is set to 1, otherwise 0.
Scan the string and check&count each char by:
if (appear[a[i]]) counter[a[i]]++;

【在 r*******y 的大作中提到】
: step 2 怎么是 O(n) ? 应该是 O(kn)吧,k是reference string 的size
avatar
b*i
14
是需要你的 credential evaluation 的证明么?

【在 s***r 的大作中提到】
: 140等啊等, nsc 几个月了, 木有消息.
: LD的h1b renew , 六个月后rfe, 让证明职位需要job requirement上写的学历, 怎么证
: 明, 这是renew啊, 啥都没变, 上次批了, 这次要推翻自己上次的判断?
: 我自己的h1b renew, 交了三个月后rfe, 说我用了超过6年了, 连律师都和我double
: confirm 我h1b首次开始时间, 觉得不可思议, 2008开始的啊, 连时间都算错...

avatar
s*y
15
Sounds good. I write the code according to your idea. But still need to defi
ne a 256 byte array to hash the reference string and count the times they ap
pear.
Any better way I could ger rid of the 256 byte array?
#define SWAP(A,B) { \
char tmp; \
tmp = A; \
A = B; \
B = tmp; }
char input[] = "ABBFKCEDGAB";
char pattern[] = "BAC";
void SortString(char input[], char pattern[])
{
char hash[256] = {0};
int i,j;
int count;

i = 0;
while(pattern[i]) {
hash[pattern[i]] = 1;
i++;
}

for (i = -1, j = 0; input[j] ; j++) {
if ((hash[input[j]] & 0x1) == 1) {
//use the higher 7 bits to count the character, 0bit to check if
the character present
hash[input[j]] = (hash[input[j]] & 0x1) | (((hash[input[j]] >> 1
) + 1) << 1);
i++;
SWAP(input[i],input[j]);
}
}
//SORT THE STRING BASE ON COUNT
i = 0;
j = 0;
while(pattern[i]) {
for(count = hash[pattern[i]] >> 1 ; count > 0; count--) {
input[j] = pattern[i];
j++;
}
i++;
}

return;
}
int main()
{
char input[] = "ABBFKCEDGAB";
char pattern[] = "BAC";
SortString(input, pattern);
return 0;
}

【在 m**q 的大作中提到】
: A in-place string sorting method inspired by your idea:
: 1. partition the string - the left part contains chars
: which appears in reference string, the right part contains
: the rest chars. At the same time, count the chars appeared
: in reference string. O(n)
: 2. overwrite the original string from the beginning, as
: we already have the counters calculated in step 1. The
: result is the left part is overwritten with chars with
: the correct order, and the right part remains unchanged
: from step 1. O(k) while k is the length of left part.

avatar
s*r
16
credential evaluation是什么?
律师也没说要这个,给我一个h1b使用超过6年的list,比如批准的I140之类的...

【在 b******i 的大作中提到】
: 是需要你的 credential evaluation 的证明么?
avatar
g*s
17
It is not correct since it is not stable. - it may changes the order of the
chars that are not in the reference string.

defi
ap

【在 s*****y 的大作中提到】
: Sounds good. I write the code according to your idea. But still need to defi
: ne a 256 byte array to hash the reference string and count the times they ap
: pear.
: Any better way I could ger rid of the 256 byte array?
: #define SWAP(A,B) { \
: char tmp; \
: tmp = A; \
: A = B; \
: B = tmp; }
: char input[] = "ABBFKCEDGAB";

avatar
g*e
18
1. use a linked hashmap to add the reference string, char as key, counter as
value, initialized to 0
2. scan target string, update the hashmap counter, put the chars that are
not in ref string to the front of the original string.
3. iterate the linked hashmap, then append the rest in the end.

【在 h*****g 的大作中提到】
: 说是有一个string, ABBFKCEDG; 还有一个reference string BAC
: 说是要把第一个string里的字母按照reference string里字母的顺序进行排序(没有出
: 现在reference string里的字母按原来的顺序写在后面),有什么比较好的办法?
: for example, the first string should output at
: BBACFKEDG

avatar
g*s
19
it is an interesting question. no need to iterate hashmap. just scan the
ref str at the last step.
basically it's a remove_if() + count_sort() combined problem. O(n) T and
O(n) S.
but remember to scan the string from the tail for remove_if().

counter as
are

【在 g**e 的大作中提到】
: 1. use a linked hashmap to add the reference string, char as key, counter as
: value, initialized to 0
: 2. scan target string, update the hashmap counter, put the chars that are
: not in ref string to the front of the original string.
: 3. iterate the linked hashmap, then append the rest in the end.

avatar
j*r
20
You're right. Use merge sort. Time O(n log n)
An alternative method is counting sort. Time is O(n).

【在 g***s 的大作中提到】
: quicksort is not a stable sort.
:
: sort.

avatar
e*s
21
1. Recoding the characters:
ABBFKCEDG => A B B FK C EDG
012345678 -2 -3 -3 34 -1 678
'B' => -3
'A' => -2
'C' => -1
2. Then use the regular qsort.
avatar
m*q
22
Grass is correct, this is not stable thus some chars could
be re-ordered.
A correction is, for step 1, don't partition the string, but
only count each char appeared in the reference string, and
also the total number of chars appeared in the reference string.
Do an in-place deletion from the end. Step 2 is the same.

【在 m**q 的大作中提到】
: A in-place string sorting method inspired by your idea:
: 1. partition the string - the left part contains chars
: which appears in reference string, the right part contains
: the rest chars. At the same time, count the chars appeared
: in reference string. O(n)
: 2. overwrite the original string from the beginning, as
: we already have the counters calculated in step 1. The
: result is the left part is overwritten with chars with
: the correct order, and the right part remains unchanged
: from step 1. O(k) while k is the length of left part.

avatar
c*t
23
按照maxq的想法,我写了下面的程序(in-place)。好像it works.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。