## Forum Posts

- 0 Answers
**Question**There are around 40 million files in a directory which needs to be transferred to another system via FTP in order of oldest file first. What's the ideal way to iterate over files and store it in a data structure from where it can be transferred?

- anjesh June 12, 2017| Flag | PURGE - 0 Answers
**qwrew**A mission-critical production system has n stages that have to be performed sequentially; stage

- tanvirmahmud201505039 June 08, 2017

i is performed by machine Mi. Each machine Mi has a probability ri of functioning reliably and

a probability 1 − ri of failing (and the failures are independent). Therefore, if we implement

each stage with a single machine, the probability that the whole system works is r1 · r2 · · · rn.

To improve this probability we add redundancy, by having mi copies of the machine Mi that

performs stage i. The probability that all mi copies fail simultaneously is only (1 − ri)mi, so the

probability that stage i is completed correctly is 1 − (1 − ri)mi and the probability that the whole

system works is Qni=1(1 − (1 − ri)mi). Each machine Mi has a cost ci, and there is a total budget

B to buy machines. (Assume that B and ci are positive integers.)

Given the probabilities r1, . . . , rn, the costs c1, . . . , cn, and the budget B, find the redundancies

m1, . . . , mn that are within the available budget and that maximize the probability that the

system works correctly| Flag | PURGE - 0 Answers
**Designing a data-structure**We need to implement a data-structure for following functions

- arnav251035 May 29, 2017

Insert X : Insert an element X into the set.

Delete X : Delete an element X from the set. It is guaranteed that such X always exist in the data structure.

Mean : Report Mean of the elements present in the data set. It is guaranteed that data structure will not be empty at this query.

Mode : Report Mode of the elements present in the data set. It is guaranteed that data structure will not be empty at this query.

Median : Report Median of the elements present in the data set. It is guaranteed that data structure will not be empty at this query

I had created a linked list of the values, and like insertion sort I inserted the elements in the Linked List. Deletion was also the same as deletion in Linked List. Mean I calculated on the run as and when the values came. For mode I traversed the whole linked list to see which element occurs the most. Median was the middle element in the linked list.

I know there is an efficient algorithm to calculate median on the run using two heaps (min and max) but calculating mode was the biggest problem I faced. The number of queries ranged to 10^5 and the time limit was given 3 secs. Had a TLE error| Flag | PURGE - 0 Answers
**6 to 8 months project ideas to build up résumé**Hello,

- otto.alyz April 18, 2017

I'm planning to go through big IT companies interviews (basically the GAFAs) in 8 months from now, and I would like to get some suggestions about ideas of projects I can work on to present during my interviews and build up my résumé.

I ideally looking for a project that would make me practice the OOP principles like SOLID, as well as other things like scalability, algorithms and data structures and so on.

Thanks in advance for your suggestions.| Flag | PURGE - 0 Answers
**Amazon Rejection**Hi All,

- mourya.rohit32 April 10, 2017

The day before yesterday, I got rejected from Amazon in the final round for SDE-T. Though I was more interested in SDE.

All the rounds were quite easy for me and I solved all the questions. However in the last round, I knew both the questions but failed to arrive to a good solution. I knew the correct data structure which can be used to get O(n) solution however, I failed to code it and thus I was eliminated.

My question is, are there any chances for getting call from Amazon based on my interview answers for SDE in future or I've to wait for 6 months and again apply for SDE position.?

Any response would be welcome.

Thanks,

Rohit| Flag | PURGE - 0 Answers
**Request for assistance - Was interviewed by Amazon no information after telephonic round**Hi there,

- Madhulika.NYC April 03, 2017

I was interviewed by Amazon. I thought I did very well in the telephonic round. I think the interview went on for more than an hour. The interviewer did say that someone will contact me, but no one had contacted me since then.

When I checked my status at amazon job application site it shows Accepted - In Progress. I don't know how long to wait for.

Could someone please assist me?| Flag | PURGE - 0 Answers
**algorithm**the maximum number of pebbles collected when you move from cell-(1,1) to cell -(4,5) is 127 and the path that leads to it is given by:(1,1)->(2,1)->(3,2)->(4,3)->(4,4)->(4,5)

- enfield.12biker March 26, 2017

write an algorithm to find maximum pebbles while going from cell -(1,1) to cell -(m,n| Flag | PURGE - 0 Answers
**Sab labs programming question**You have developed an e-commerce website,SHOPPY.Many people have created accounts at your website.you have the passwords of all the users.you want to know how many distinct password =s are there in total.Details of the passwords are as described:

- premjeetsingh6288 February 28, 2017

Each password is a string of characters from a to z

Two passwords, say pass1 and pass2 are said to be same if pass2 can be obtained by swapping the ith character in pass1 where (i+j)%2=0

Input:

input1:N,number of users registered input2[]:Array of strings containing all passwords of the N users.

Output: return T total number of distinct password present

Example: input:2,{abcd,cdab}

output: 1

input:2,{abcd,bcad}

output: 2| Flag | PURGE - 0 Answers
**Sab labs programming question**You have developed an e-commerce website,SHOPPY.Many people have created accounts at your website.you have the passwords of all the users.you want to know how many distinct password are there in total.Details of the passwords are as described:

- premjeetsingh6288 February 28, 2017

Each password is a string of characters from a to z

Two passwords, say pass1 and pass2 are said to be same if pass2 can be obtained by swapping the ith character in pass1 where (i+j)%2=0

Input:

input1:N,number of users registered input2[]:Array of strings containing all passwords of the N users.

Output: return T total number of distinct password present

Example: input:2,{abcd,cdab}

output: 1

input:2,{abcd,bcad}

output: 2| Flag | PURGE - 0 Answers
**Amazon Onsite Interview - Group Assessment**Hello Everyone,

- charchil1990 February 20, 2017

I have my amazon onsite group assessment round in march. I tried researching on glassdoor and other websites but was not able to find exactly what type of questions are asked in the first round (Analyze the algorithms in a group) and in second round(complete 3 milestones in given timeframe).

Can anybody help me with more details related to type of questions and tips to crack this interview?| Flag | PURGE

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

Open Chat in New Window