Posts

Showing posts from May, 2018

301. Remove Invalid Parentheses

https://leetcode.com/problems/remove-invalid-parentheses/submissions/1 Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note:  The input string may contain letters other than the parentheses  (  and  ) . Example 1:

Map in c++

map : A collection that stores pairs where each pair consists of a first half called a key and second half called a vlues. - sometimes called a "dictionary","associative array", or "hash" - usage: add(key,value) pairs; look up a values by supplying a key. real-world examples:  - dictionary of words and definations  - phone book  - social buddy list. Map Opration m.put(key.value) : adds key/value pair to the map. m.get(key): returns the value paired with the given key. m.remove(key): removes the given key and its paired value. Map Vs HashMap Map - implemented using a linked structure called binary search tree.  -  pretty fast for all operations; keys are stored in sorted order.  - both kinds of maps implement exactly the same operations. HashMap - implemented using a special array called a hash table.  - very fast but keys are stored in unpredictable order.

Ace the Amazon Interview

Image
Ace the Amazon Interview Below are some tips we hope you will find helpful in preparing for your meetings with our team. Dress Code Our dress code at Amazon is relaxed, so we encourage you to dress comfortably in business casual attire. At work, you’ll find most engineers in t-shirts and jeans. No suits please. Company Background Know what interests you about Amazon and the team or teams you will be interviewing with. It may help to spend some time researching our specific products and features, as well as our competitors. Knowing about our product groups and how they all interact with each other will give you context around our roles and will likely prompt deeper conversations that will hopefully provide a richer interview experience. Refer back to the team link(s) I sent in my first few emails. Event Format You will meet 1:1 with several Amazonians. The interviewer team will be comprised of Software Development Managers and Senior Engineers. Each inte...

Google Interview Preparation

The software design process boils down to 4 main steps, this interview process is looking for you to show those things. Requirements -  Ask clarifying question The requirements given are usually vague. The problem to solve isn't the one given. It's the one in your head. People typically prepare with hackerrank or leetcode where they have to specify the problem clearly and with all of the test cases right away because you can't ask any questions. That isn't true in an interview. Ask questions! Test -  Show it works If you can't determine the input output of your test cases before you start designing you likely don't know what your supposed to be writing yet. Thinking about corner cases and potential pitfalls before you start will save a lot of time. It also forces you to run the program you're about to write in your brain first giving you a better intuitive understanding of your approach. Design -  Explain your algorithm This lets you show...