Redian新闻
>
G2 16个小时待机电量还是100%
avatar
G2 16个小时待机电量还是100%# PDA - 掌中宝
P*d
1
两个问题都是很简单的,一个LEETCODE的ATOI,一个是CC150的字母压缩
ATOI(String转number),我用Linear的方法做了,他不满意,要我改进(他明确说了
是改进速度)。。。说如果
他告诉我这个数的范围,比如0-3000,我可不可以改进,我想了半天还是觉得不管怎么
样我们还是得一个一个字符去CHECK啊,求教有啥好方法吗?
字母压缩就是比如abbbccddeefgh,转换为a1b3c2d2e2f1g1h1,我新建了一个输出数组
来输出的,他问我能不能改进一下在同一个数组里操作。。。。这个题没有办法在同一
个数组操作吧,因为1个字母也要count,这样不论从前面还是后面开始我们操作的过程
中,over write的数组的部分都可能是我们还没有操作过的字符。。。。
真是百思不得其解
两个题都做出来了,就是上面两个FOLLOW UP问题根本没法做,百思不得其解
avatar
r*s
2
Nov 28th 发SR, 今天收到response,
Title 8, Code of Federal Regulations, Section 103.2 prohibits this office
from responding to an inquiry submitted by anyone other than the petitioner,
applicant, or legal representative. We will be happy to address the status
of this case if such a request is submitted by the petitioner, applicant,
or legal representative.
Title 8, Code of Federal Regulations, Section 103.2(a)(3) states, in
pertinent part:
A beneficiary of a petition is not a recognized party in such a proceeding.
An application or petition presented in person by someone who is not the
applicant or petitioner, or his or her representative as defined in this
paragraph, shall be treated as if received through the mail, and the person
advised that the applicant or petitioner, and his or her representative,
will be notified of the decision.
问题是, applicant , petitioner , legal representative 分别指什么?
applicant 不是我自己么 ? 还是我自己只能算是beneficiary ?
petitioner 是公司 ? legal representative 是律师 ?
那也就是说,这个只能自己找公司或者律师提交SR 了?
谢过了先
avatar
r*o
3
平时正常使用也就两天冲次电,这回从昨晚8点充好电后到现在刷了两次微博,没使用
电话,居然电量一格没掉!这么神奇?
avatar
S*e
4
1. Use the hashtable to cache the results. So all the subsequent
transformation is constant for the same string.
2. For the letter count whose count is 1, omit the number, so yes, you can
do it on place.
avatar
p*o
5
140的话,你只是beneficiary,确实只能让公司或者律师做SR。

petitioner,
status
.

【在 r*****s 的大作中提到】
: Nov 28th 发SR, 今天收到response,
: Title 8, Code of Federal Regulations, Section 103.2 prohibits this office
: from responding to an inquiry submitted by anyone other than the petitioner,
: applicant, or legal representative. We will be happy to address the status
: of this case if such a request is submitted by the petitioner, applicant,
: or legal representative.
: Title 8, Code of Federal Regulations, Section 103.2(a)(3) states, in
: pertinent part:
: A beneficiary of a petition is not a recognized party in such a proceeding.
: An application or petition presented in person by someone who is not the

avatar
d*i
6
电量监控的进程挂了吧,重启下就看到真实电量了。

【在 r*********o 的大作中提到】
: 平时正常使用也就两天冲次电,这回从昨晚8点充好电后到现在刷了两次微博,没使用
: 电话,居然电量一格没掉!这么神奇?

avatar
J*3
7
第二题 意思是输入abc 输出还是abc吗?

【在 S****e 的大作中提到】
: 1. Use the hashtable to cache the results. So all the subsequent
: transformation is constant for the same string.
: 2. For the letter count whose count is 1, omit the number, so yes, you can
: do it on place.

avatar
d*g
8
他的电池监控有时不准,不信你留意下这次可能会挂电比较快。
avatar
w*s
9
1. compute hash code of a string is O(n)

【在 S****e 的大作中提到】
: 1. Use the hashtable to cache the results. So all the subsequent
: transformation is constant for the same string.
: 2. For the letter count whose count is 1, omit the number, so yes, you can
: do it on place.

avatar
r*o
10
确实这次掉电比较快,36个小时了,电池已经显示51%
avatar
w*e
11
关于第二题我是这么想的:
1. 因为单独一个字母也要count,可能使得输出串甚至比输入更长,所以需要明确保证
数组有足够的空间。
2. 可以先从做往右扫一遍,遇上单独一个字母不用管,否则计数update。比如
abbbccddeefgh最后变成ab3c2d2e2fgh.记住数目为1的字母总数,这道题里面是4.
3. 已经能知道输出字符串的总长,从右往左scan。

【在 P****d 的大作中提到】
: 两个问题都是很简单的,一个LEETCODE的ATOI,一个是CC150的字母压缩
: ATOI(String转number),我用Linear的方法做了,他不满意,要我改进(他明确说了
: 是改进速度)。。。说如果
: 他告诉我这个数的范围,比如0-3000,我可不可以改进,我想了半天还是觉得不管怎么
: 样我们还是得一个一个字符去CHECK啊,求教有啥好方法吗?
: 字母压缩就是比如abbbccddeefgh,转换为a1b3c2d2e2f1g1h1,我新建了一个输出数组
: 来输出的,他问我能不能改进一下在同一个数组里操作。。。。这个题没有办法在同一
: 个数组操作吧,因为1个字母也要count,这样不论从前面还是后面开始我们操作的过程
: 中,over write的数组的部分都可能是我们还没有操作过的字符。。。。
: 真是百思不得其解

avatar
c*p
12
mark
avatar
s*c
13
Have you communicate with them your thoughts? What's their response?
For interview, a big no no is to think for 5 min and then give an negative
answer. Should always told them your line of thought.

【在 P****d 的大作中提到】
: 两个问题都是很简单的,一个LEETCODE的ATOI,一个是CC150的字母压缩
: ATOI(String转number),我用Linear的方法做了,他不满意,要我改进(他明确说了
: 是改进速度)。。。说如果
: 他告诉我这个数的范围,比如0-3000,我可不可以改进,我想了半天还是觉得不管怎么
: 样我们还是得一个一个字符去CHECK啊,求教有啥好方法吗?
: 字母压缩就是比如abbbccddeefgh,转换为a1b3c2d2e2f1g1h1,我新建了一个输出数组
: 来输出的,他问我能不能改进一下在同一个数组里操作。。。。这个题没有办法在同一
: 个数组操作吧,因为1个字母也要count,这样不论从前面还是后面开始我们操作的过程
: 中,over write的数组的部分都可能是我们还没有操作过的字符。。。。
: 真是百思不得其解

avatar
s*z
14
可以加速的:四个字节看作一个int,hash{0X39323332} = hash{"9232"} = 9232;这样
你一次可以match上四个字符。
第二个:
abcdddededddd => abcd3eded4?
avatar
l*g
15
第二题,a-z 一共26个,用一个byte的高5bits存a-z,用剩下的3bits作为计数。

两个问题都是很简单的,一个LEETCODE的ATOI,一个是CC150的字母压缩ATOI(String
转number),我用Linear的方法做了,他不满意,要我改进(他明确说........

【在 P****d 的大作中提到】
: 两个问题都是很简单的,一个LEETCODE的ATOI,一个是CC150的字母压缩
: ATOI(String转number),我用Linear的方法做了,他不满意,要我改进(他明确说了
: 是改进速度)。。。说如果
: 他告诉我这个数的范围,比如0-3000,我可不可以改进,我想了半天还是觉得不管怎么
: 样我们还是得一个一个字符去CHECK啊,求教有啥好方法吗?
: 字母压缩就是比如abbbccddeefgh,转换为a1b3c2d2e2f1g1h1,我新建了一个输出数组
: 来输出的,他问我能不能改进一下在同一个数组里操作。。。。这个题没有办法在同一
: 个数组操作吧,因为1个字母也要count,这样不论从前面还是后面开始我们操作的过程
: 中,over write的数组的部分都可能是我们还没有操作过的字符。。。。
: 真是百思不得其解

avatar
j*e
16
nice

String

【在 l*******g 的大作中提到】
: 第二题,a-z 一共26个,用一个byte的高5bits存a-z,用剩下的3bits作为计数。
:
: 两个问题都是很简单的,一个LEETCODE的ATOI,一个是CC150的字母压缩ATOI(String
: 转number),我用Linear的方法做了,他不满意,要我改进(他明确说........

avatar
r*c
17

不明白,用hash对单独一次的转换有什么可加速的?

【在 s*******z 的大作中提到】
: 可以加速的:四个字节看作一个int,hash{0X39323332} = hash{"9232"} = 9232;这样
: 你一次可以match上四个字符。
: 第二个:
: abcdddededddd => abcd3eded4?

avatar
s*z
18
你不用for循环了,只用一次寻址操作。另外我觉得这里考察的不一定是只有四个字节
,那个可能是一个提示吧。
avatar
P*d
19
不是的,1也要放进去,所以我说是傻X问题

【在 w*****e 的大作中提到】
: 关于第二题我是这么想的:
: 1. 因为单独一个字母也要count,可能使得输出串甚至比输入更长,所以需要明确保证
: 数组有足够的空间。
: 2. 可以先从做往右扫一遍,遇上单独一个字母不用管,否则计数update。比如
: abbbccddeefgh最后变成ab3c2d2e2fgh.记住数目为1的字母总数,这道题里面是4.
: 3. 已经能知道输出字符串的总长,从右往左scan。

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