No the repetitive elements will not be counted as continuously increasing.
Could you give a counter-example?
一些常见面试题的答案与总结 - http://www.ihas1337code.com
Given a number N, print all the ways (combinations) to represent the number
from the given set of integers.
Ex: Given set is {2,3,7,8,9} and given number N = 7, then the combinations
are:
7,2+2+3. Repetitions are not allowed, hence 3+2+2 or 2+3+2 are not allowed.
是个典型的递归搜索。
面试的人问他能不能O(n^2)或者O(n^3), 这个不可能吧?允许一个数重复用的话,答案
就是指数级的。
有什么想法?
It is easy to come up with an $O(SL)$ algorithm for this problem but what is
good about this problem is that it actually has a linear time solution:
Let’s first make some notations clear:
1) |S| -> The length of S.
2) |L| -> The number of words in the list $L$.
3) $len_L$ -> The length of each string in $L$.
First we use an Aho-Corasick automaton to find out the occurrences of all
patterns. The time complexity of this step is $O(|S| + |L| * len_L + z)$
where $z$ is the number of output matches. ... 阅读全帖
FULL TIME POSITION
hope you are doing good. Below are the 4 different positions of SDET. Please
let me know your comfort level with these
Redmond,WA
JOB-1:
Role: SDET with Windows 8
Experience: 4+ years
Following would be some of the responsibilities for the role:
1. Work along with test lead for the assigned business applications
2. Understand the assigned applications from a functional perspective
3. Create test cases based on business & technical requirements
4. A... 阅读全帖
you are given nos 1,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 u hav to form a 9 digit no such
dat 1st 2 digits are divisible by 2,1st 3 digits are divisible by 3,1st 4
digits are divisible by 4 and so on..... (repetitions not allowed)
但是我觉得那个最后fail的情况我return -1 不太好,这样即使fail了还会再在这个错
的上面try组合,虽然我让他即使退出了,但是还会有函数调用在stack上,还有怎么能
让这个函数return那个正确的值哪?本体只有一个正确的值
int GenerateNumber(string input, int digit, bool used[],int number, int n)
{
int temp = 0;
//early termination if failed
int numbeofdigit = 0;
... 阅读全帖
you know the center and the orientation (assuming card is rectangle) for
each card
to test whether a point falls onto a particular card is equivalent to test
whether a 2D point is within a rectangle.
one way to do this is to write down the line equations for all sides in the
form f(X,Y) = aX + bY + c = 0... and check
f_1(x, y)*f_2(x, y) <= 0 && f_3(x, y)*f_4(x, y) <= 0
here f_1 and f_2 denote the line equations of parallel sides and similarly f
_3, f_4. f_1(x, y)*f_2(x, y) <= 0 means point (x,y... 阅读全帖
Career path is dead end, not much upward mobility, and once you are an QA,
it's hard for you to switch to SDEV. QA is basically paper pushing like a
glorified secretary, it is preserved for people not very good at programming
but can endure or even thrive in tedious repetitive work.
In terms of salary, if you search Glassdoor, SDET earns about 85% of SDEV
and QA earns about 75-80% of SDEV, you can see who is important now in the
company. America is capitalism and your value/respect correlates to... 阅读全帖
Two positions - Staff Thermal Engineering Architect and MTS, Tin Mitigation
Functional Architect.
Staff Thermal Engineering Architect
SUMMARY
For the development of novel thermal system solutions within our EUV plasma
chamber Mechanical Engineering team, we are seeking an experienced and
creative Staff Thermal Engineering Architect. Help us to develop well
engineered thermal architectures based on advanced FEA modeling and
instrumentation to enhance our tin capture and removal systems and provi... 阅读全帖
你这个可以, 但是有重复的,会降低算法的效率。可以改进成无重复的方法:
Output 1,
L2 - 2 // collect 2^i*3^j*5^k
L3 - 3 // collect 3^j*5^k only
L5 - 5 // collect 5^k only
Output 2, put 2*2 to L2
L2 - 4
L3 - 3
L5 - 5
Output 3, put 3*2 to L2, put 3*3 to L3
L2 - 4, 6
L3 - 9
L5 - 5
Output 4, put 4*2 to L2
L2 - 6,8
L3 - 9
L5 - 5
Output 5, put 5*2 to L2, put 5*3 to L3, put 5*5 to L5
L2 - 6,8,10
L3 - 9,15
L5 - 25
So on and so forth. This way, there won't be any repetitions and the
algorithm is precisely effective.
Implement a encoding system as following:
Abckkkkkkkkkkks55p=> Abc11xk55p.
Rules:
encoded them as: [n]x[c]
where n is the repetition count and c is the actual character,
X is the special character.
Decoder side:
Any time above pattern is detected, it will output n number of c.
If x is the last character, output x.
How do you handle x in the original input?
Correction:
1. Complexity is n*lg(max(n)), so this algorithm works well if there are
large amount of repetitive smaller numbers;
2. In the last step, there should exist only one group with even number of
elements which has the even number;
过了onsite还要这么罗嗦? 招聘人员发来的。都要回答?
---------------------------------------------------
n order for me to best prepare for this part of the process, I will need the
following from you (and apologies in advance for some repetition from our
phone calls):
1. Three references: please let your references know to expect an email/
call from us in the next few days. Also – please confirm their title,
relationship to you, and best way to contact them. (At least one reference
should be from a current/recent ... 阅读全帖
Company: a Global Well-Funded Dynamic Electric Vehicle Start-Up
In this role, you will be part of IT/Digital operation team and have the
opportunity to work with various engineering teams to develop and support
both on-perm and on global-cloud platform.
Responsibilities:
Ø Responsible for on perm Data Center infrastructure planning and
setup
Ø Responsible for the day-to-day support, and ongoing maintenance and
ensuring the environment is scalable to meet growth, including ongoing
imp... 阅读全帖
Company: Mitsubishi Electric Research Labs
Location: 201 Broadway, Cambridge, MA 02139
Start Date: September 1, 2009
Duration: 4 months
Project title: Low complexity space-time adaptive signal processing
Project Description: Space-time adaptive processing (STAP) refers to
processing signals received on multiple elements of an antenna array and
from multiple transmitted pulses separated by a repetition interval. STAP
improves low velocity target detection by offering robust and strong clutter
re
Cost Accountant
Duties and Responsibilities
• Support an accurate and on time monthly close and reporting cycle
, including preparation of all inventory related reconciliations.
• Prepare and enter cost and inventory-related journals entries,
including freight, inventory and reserve entries.
• Understand and apply GAAP accounting principles, procedures,
guidelines and business rules.
• Develop and maintain costing system including overhead pool
analysis betwee... 阅读全帖
If interested, please email your resume to arthurbuffet At hotmail.com
ABOUT THE ROLE
The Clinical Laboratory Scientist is responsible for performing high
complexity laboratory testing (Next generation DNA sequencing) on patient
specimens, performing quality control and quality assurance procedures,
interpreting and reporting patient results, and complying with all
applicable local, state and federal laboratory requirements. The work
requires keeping meticulous and organized records, excellent a... 阅读全帖
Harassment covers a wide range of behaviors of an offensive nature. It is
commonly understood as behaviour intended to disturb or upset, and it is
characteristically repetitive. In the legal sense, it is intentional
behavior which is found threatening or disturbing.
In crime and law, hate crimes (also known as bias-motivated crimes) occur
when a perpetrator targets a victim because of his or her perceived
membership in a certain social group, usually defined by racial group,
religion,etc.
To com... 阅读全帖
☆─────────────────────────────────────☆
GlacierMin (秦皇汉武) 于 (Sat Sep 17 22:24:44 2011, 美东) 提到:
我爸妈偶尔用落地晒衣架把衣服晾在阳台上。今天某个邻居丢了一个纸条。我看了以后
非常生气。字里行间充满了种族歧视。原文如下:
This is Not China...its the GOOD be USA(还双线画上了USA)!!
According to the Bylaws...you can not (画上了下划线)DRY/HANG clothes on your
balcony!
I am tired of seeing your laundry...takes away from the beauty of the
building. Please take care of today!
首句中就stereotype China and Chinese,让我非常不爽!靠,咱中国可是美国人的债
主!我仔细查阅了我的lease,里面只是说"may not"而不是"can not"。两个... 阅读全帖
I agree that from pov of techniques and skills reqiured,DIY installing
those click n go flooring planks is pretty easy. but, when factoring the
amount of work, time and laborious factor, it may not be worth the hassle. I
am looking at hand a job to replace laminate in a basement, and tearing
down the existing flooring, hauling all the shit up stairs and dumping it,
carrying the new underpayment and 70 cartons of the flooring back down the
steps...... this simple physical labor and repetitive nat... 阅读全帖
Many possibilities, from repetitive injury to pinched nerve. You should
arrange to see doc soon.
Bengay and advil will mask the symptoms for a while, but won't solve the
underlying cause.
WASHINGTON—Combining aerobic exercise and resistance training lowered blood
-sugar levels in people with Type 2 diabetes, a new study has found.
The same improvement in glycemic levels wasn't seen among patients who
performed aerobic exercise or resistance training alone, according to the
study, which will be published in this week's Journal of the American
Medical Association.
Patients who walked and lifted weights also lost more fat and trimmed their
waistlines more than people who did just on... 阅读全帖
well, you may argue that some of his thoughts are obsessive thoughts instead
of delusional thoughts. in obsessive thoughts, there is no detachment from
reality. you don't see a corpse under a chair in obsessive thoughts, you don
't feel like entering a tomb in obsessive thoughts. "如果过分克制自己的想法
会出现呕吐的症状" also argue against it as an OCD.
repetitive behavior does not make it an OCD. it also appears in psychosis.
this could well be the reason why he has seen many "doctors" and taken many
drugs withou... 阅读全帖
he will need EMG (including repetitive nerve stimulation and conduction
velocity). EMG will tell pretty well what group of diseases he has.
Definitive diagnosis can usually be achieved by muscle biopsy. Nerve biopsy
is unnecessary with this kind of presentation.
standard EMG uses fine needle electrodes. in small children, this requires
right level of sedation plus quite some experience.
if this is not possible, there is surface EMG which is non-invasive but
gathers less information.
if he has ea... 阅读全帖
Some people are sadistic. The tissues and ligaments of babies are very
fragile and repetitive shaking can cause injuries to vital organs or the
brain.
Imaging shake a bag of tofu for 5 minutes.
我打字很慢,这里重贴一个我以前写的关于自闭症的文章:我在另一个版回应了一个帖
子,在这里把我的帖子再发一次:
I am a licensed psychologist specialized in the diagnosis and treatment of
Autism.Here is some basic information about autism.
If you have questions, please email me. I'd be glad to provide more
information.
Autism Spectrum Disorder (ASD)is a neurological disorder that has a strong
genetic component. However the etiology is not clear at this point.
大约50% 的患autism的人有智力障碍,有相当一部分患者没有语言功能。所谓“天才”
确实存在,但绝不是“autism"的代名词。在我的经验当中,这样的“天才”占极小的
比率,但是媒体都... 阅读全帖
LEGS:
1. Ankle Pumps-Flex and extend ankles repetitively
-Target muscle area is front and back of the lower leg(anterior tibialis and gastroc, respectively). Good for promoting circulation and balance.
2. Heel Slides-Slowly bend knee so that your heel slides up towards you hip, then straighten your leg out again.
-Target muscle is hip flexor and quadriceps.
3. Snow Angels(Hip Abduction/Adduction)-Begin with ankles together, legs straight. Slowly move one ankle out to the edge of the bed, a... 阅读全帖