compskiguy
BAN USER
- 0of 0 votes
Answersgive an algorithm for finding duplicate parenthesis in a expression.
- compskiguy in India for Bing(( a + b ) * (( c + d )))
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer
Risk Worth Taken:
decided to deliver an app to be showcased in keynote stage with CEO of my organization in front of thousands of customers, analysts & board members in a marketing technical event.
I was successful in delivering the product in short time frame with limited resources by ensuring best practices. the demo went successful and I got many awards & recognition for this.
On an earlier instance the demo was not showcased due to some last minute changes in priorities but got great learning from the effort spend, but no tangible awards for this except satisfaction from experience gained and confidence with a feeling I can do it (next time).
based on past experience and details available to them. ask managers to estimate on incoming customer tickets rate and ticket resolution rate per resource. keep reviewing the plan once every week.
pre- production issues:
no. of resources needed = [ no. of existing tickets + ( new ticket arrival rate per day - tickets fixed per day) * number of days remaining to close all tickets ] / tickets fix rate per resource.
for post production issues:
number of resources = number incoming ticket * average effort in hours per tickets / service level agreement (in hours)
I was asked this question while getting interviewed for product manager position at google.
think about database design, what all information you would store in addition to news message
- news text
- data & time
- location
- reporter
- likes
- views ..etc
how would you store them in database efficiently for fast retrieval. how would you order/index them so that user sees the most relevant ones at the top.
These days almost real time updates would be required hence an effective caching strategy would also be required.
With this question interviewer is looking to understand what all phases of product development you have got exposure to in your career.
Based on your response he/she can judge you on how well would you be able to plan & estimate for the project he/she is hiring for. More thorough the process is lesser are the change of project failing it goals.
these days many software/IT firms deliver new software products in 6 months.
- feature wish list from product / solution management
- business impact & approvals
- high level design, prototyping & feasibility analysis
- available budget & capacity planning
- committing on delivery features
- preparing specifications & architecture
- UX Design / Mockups
- Test cases & test cycle plans
- task breakdowns & implementation
- feature complete / code freeze & unit testing
- integration, interoperability & solution testing
- Documentation
- change management (for scope changes / new requirements etc.)
- approvals for compliance to various product standards
- Release noting & software delivery
The time to market for an IT hardware product is generally higher as it involves few prototypes refinements & various compliance testings according to markets its planning to address.
- Requirements & Technical Specifications
- Industrial Design
- Mechanical & Electrical Design
- Manufacturing
- Yield check
- Performance, Reliability Testing
- Compliance Testing & Certifications
- Release to Market
Heap
The heap is maintained OS for handling memory allocation (e.g. new, delete, malloc, ...).
Heap Corruption
Heap corruption occurs when the heap's bookkeeping data--such as which parts of memory are allocated and which are free for new allocations--are corrupted.
Causes of Heap Corruption
This usually occurs from incorrect use of memory allocation functions.
Effects of Heap Corruption
After heap corruption, undefined behaviour occurs; the program may appear to work correctly to start with, but might fail on the next run, or when recompiled, or at any other time.
The test consists of the following 3 papers.
1. Java SE /Java EE (Language Skill Paper) or C++ - 45 minutes
2. Data Structures, Algorithms, OS - 45 minutes
3. Quant/Analytical - 45 minutes
test for the following sorted input
{-5, -3, 1, 3, 7, 10}
O(1) is even not possible
the code run in N time.
- compskiguy January 05, 20121. Read 2GB (= 2 file) of the data in main memory and sort by some conventional method, like quicksort.
2. Write the sorted data to disk.
3. Repeat steps 1 and 2 until all of the data is in sorted 2 GB chunks (there are 10 GB / 2 GB = 5 chunks), which now need to be merged into one single output file.
4. Read the first 1 GB of each sorted chunk into input buffers in main memory and allocate the remaining 5 GB for an output buffer. (In practice, it might provide better performance to make the output buffer larger and the input buffers slightly smaller.)
5. Perform a merge and store the result in the output file. If the output buffer is full, write it to the final sorted file, and empty it.
6. If any of the 5 input buffers gets empty, fill it with the next 1 GB of its associated 2 GB sorted chunk until no more data from the chunk is available.
This is the key step that makes external merge sort work externally -- because the merge algorithm only makes one pass sequentially through each of the chunks, each chunk does not have to be loaded completely; rather, sequential parts of the chunk can be loaded as needed.
The algorithm is based on slight modification to quick sort & is of time complexity log(n).
1. select an element r randomly from the array.
2. partition the array into 2 halves, left & right such that left have elements less than or equal to the selected element r and right has elements of higher value than r.
3. now count the number of elements in left.
4. if n = size(left) return element r.
5. else if n < size (left) repeat the process on left array and ignore the right array elements.
6 else if n > size (left), ignore left array & randomly selected element r and repeat the process on right array to fine the element of order [n - size(left) - 1]. (-1 for randomly selected element).
Not the most optimal solution as sorting would require nlog(n) time. The optimal solution is in log(n) time.
- compskiguy January 02, 2012looks incorrect to me.
- compskiguy December 10, 2011check your code against each of the inputs:
( ( ( a * b ) + ( c * d ) ) )
( ( a + b ) * ( c + d ) )
( ( ( a + b ) ) * ( c + d ) ) )
I think the numbers need to be positive as negative numbers cannot be placed in the middle to form a valid number
for eg. -6 8 10
8-610 is invalid integer
shared by technical know how / experience gained while working on an project in an internal knowledge sharing site. Many people found it useful & i got appreciated, everyone started recognizing me for my contributions and technical knowledge.
- compskiguy October 01, 2016This inspired others and many such employees contacted me for guidance and review of their work.