├── LICENSE.md
├── JOB_OFFERS.md
├── INTERVIEWING.md
├── BEHAVIORAL_CONCEPTS.md
├── DESIGN_EXERCISES.md
├── COVER_LETTER.md
├── CONTRIBUTING.md
├── CODING_QUESTIONS.md
├── EXPRESSIONS.md
├── CODING_CONCEPTS.md
├── 1_1_QUESTIONS.md
├── SALARY_NEGOTIATION.md
├── README.md
├── BEHAVIORAL_QUESTIONS.md
├── CODING_EXERCISES.md
└── JOB_CAREER.md
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Proyecto 26
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/JOB_OFFERS.md:
--------------------------------------------------------------------------------
1 | # Job Offers
2 |
3 | ## Accept a Job Offer (Email Template)
4 |
5 | **Dear [Contact/Team Name]**
6 |
7 | Thank you for offering me the position of **[Role Name]** at **[Company Name]**.
8 | I am delighted to accept your offer and very excited to begin this journey.
9 |
10 | As agreed, I will be joining the company on [Date of Joining].
11 | I also accept the terms and policies of the company as detailed in the offer letter.
12 | Kindly let me know if there is any information or formalities that need to be done before joining.
13 |
14 | Thank you, once again, for this opportunity that you have extended my way.
15 | I'm looking forward to joining the team at [Company Name].
16 |
17 | Sincerely,\
18 | **[Name]**\
19 | **[Email]**\
20 | **[Phone Number]**
21 |
22 | ## Reject a Job Offer (Email Template)
23 |
24 | Hello folks at **[Company Name]**, hope you're doing well
25 |
26 | Thank you very much for offering me the position of **[Role Name]** at **[Company Name]**.
27 | I've enjoyed learning more about the role, the organization, and the company culture.
28 |
29 | After careful consideration, I have come to a difficult decision. Unfortunately, I have to decline this opportunity, although it is interesting.
30 |
31 | - Better Offer:
32 | I've received a better offer that I can't refuse. I truly appreciate the offer and your consideration.
33 |
34 | - Better Role:
35 | I've accepted another position that aligns more with my professional career goals. I sincerely appreciate the offer and want to express my gratitude for the chance to meet your team. But after careful consideration, I know this opportunity isn't the right fit for my career trajectory.
36 |
37 | Thank you again for your time and I wish you all the best in finding someone suitable for the position.
38 |
39 | Best wishes,\
40 | **[Name]**\
41 | **[Email]**\
42 | **[Phone Number]**
43 |
--------------------------------------------------------------------------------
/INTERVIEWING.md:
--------------------------------------------------------------------------------
1 | ## Doing an interview
2 | - Discussion, no questioning
3 | - Establish a safe environment to reduce pressure
4 |
5 | ## Instruments
6 | - Be more friendly, putting myself in your position
7 | - I'm a technical peer, I'm on the same level
8 | - Reduce anxiety and uncertainty
9 | - Recognize if there are faults and give thanks for the time
10 | - Objectives of the interview
11 | * Fill the vacancy
12 | * Fits another profile (Alternative)
13 |
14 | ## Essential
15 | - Previous personal experiences
16 | * Recent experience and personal construction.
17 | * Previous companies (technology product, service or other companies)
18 | * Technical decision-making process with which the candidate is familiar
19 | * Types of team structures the candidate is used to working on
20 | * Technical challenges the candidate has faced previously
21 | - Technologies and architectures used
22 | - Technical test (Assessment Process)
23 | - Principles
24 | * Empathy
25 | * Dialogue
26 | * Concrete and abstract
27 |
28 | ## Introduction
29 | Hello, my name is [Full Name] and I'm a working at [Company Name] as a [Role Name].
30 |
31 | ### Recording
32 | We are going to record this interview in order to follow up on this process and I ask for your explicit authorization.
33 |
34 | ### Phases
35 | Define what to talk about, set expectations (Roadmap)
36 | - Professional profile
37 | * Previous professional experience (technological solutions)
38 | * Concrete experience (Last projects, industries)
39 | * Types of work teams
40 | - Specific questions
41 | * Abstract elements and detailed elements
42 | * There are no wrong answers
43 | * Situational questions (challenging situations)
44 | - Fluent conversation (specific topics)
45 | * Recent technical challenges / Languages
46 | * Get indicators of the quality of the conversation
47 | * Resolution of hypothetical situations (Restrictions, delimit edges)
48 | - Design cases
49 | * Detailed and Architectural design
50 | * System Design / Architecture / Design patterns / Troubleshooting scenarios
51 | * Organization / Deployment / External Dependencies / Security / Consistency
52 | * Clusters / Sharding / Jobs / Replicate
53 | - Candidate questions
54 |
55 | ## Credits
56 | - [Hiring developers](https://qz.com/258066/this-is-why-you-dont-hire-good-developers/)
57 | - [@juanpavergara](https://github.com/juanpavergara)
58 |
--------------------------------------------------------------------------------
/BEHAVIORAL_CONCEPTS.md:
--------------------------------------------------------------------------------
1 | ## The STAR Method
2 | A structured manner of responding to a behavioural-based interview question by discussing the specific situation, task, action, and result of the situation you are describing.
3 |
4 | - Situation
5 | - Task
6 | - Action
7 | - Result
8 |
9 | ### Situation
10 | Describe the situation that you were in or the task that you needed to accomplish. You must describe a specific event or situation, not a generalized description of what you have done in the past. Be sure to give enough detail for the interviewer to understand. This situation can be from a previous job, from a volunteer experience, or any relevant event.
11 |
12 | ### Task
13 | What goal were you working toward?
14 |
15 | ### Action
16 | Describe the actions you took to address the situation with an appropriate amount of detail and keep the focus on YOU. What specific steps did you take and what was your particular contribution? Be careful that you don’t describe what the team or group did when talking about a project, but what you actually did. Use the word “I,” not “we” when describing actions.
17 |
18 | ### Result
19 | Describe the outcome of your actions and don’t be shy about taking credit for your behavior. What happened? How did the event end? What did you accomplish? What did you learn? Make sure your answer contains multiple positive results.
20 |
21 | > Be as specific as possible at all times, without rambling or including too much information.
22 |
23 | ## Axes
24 | - **Motivation**, self-motivated, passionate about real problems and company values.
25 | - **Empathy**, sees other's perspectives and motivations, fosters consensus and a collaborative work environment.
26 | - **Starting**, shows initiative, balances analysis, breaks work into chunks.
27 | - **Finishing**, perseveres, maintains focus, balances stress, lands projects.
28 | - **Able to work in an unstructured environment**, deals with ambiguity, promotes global ownership.
29 | - **Conflict Resolution**, handles challenging relationships appropriately.
30 | - **Growth**, knows their own strengths, recognizes their growth areas, invests in self-improvement.
31 | - **Communication**, uses clear, concise, compelling language.
32 |
33 | ## How to prepare for a Behavioral interview?
34 |
35 | Recall recent situations that show favorable behaviors or actions, especially involving course work, work experience, leadership, teamwork, initiative, planning, and customer service.
36 | - Prepare short descriptions of each situation; be ready to give details if asked.
37 | - Be sure each story has a beginning, middle, and an end, i.e., be ready to describe the situation, including the task at hand, your action, and the outcome or result.
38 | - Be sure the outcome or result reflects positively on you (even if the result itself was not favorable).
39 | - Be honest. Don't embellish or omit any part of the story. The interviewer will find out if your story is built on a weak foundation.
40 | - Be specific. Don't generalize about several events; give a detailed accounting of one event.
41 | - Vary your examples; don’t take them all from just one area of your life.
42 |
--------------------------------------------------------------------------------
/DESIGN_EXERCISES.md:
--------------------------------------------------------------------------------
1 | # Design Exercises
2 |
3 | - Define Actors/Stakeholders:
4 | - Customers: anyone interested in purchasing their products.
5 | - Merchants/Providers
6 | - Third party systems (sources of truth).
7 | - Define limitations and trade-offs:
8 | - Design decisions (weaknesses & strengths).
9 | - Number of write/read Transactions per day/month.
10 | - Create a high level system design:
11 | - Constraints and Assumptions.
12 | - Limitations & Unknowns.
13 | - Out of scope.
14 | - Define Non-functional and functional requirements.
15 | - Define Risks and Strategies (Bottlenecks, Restrictions, delimit edges, Troubleshooting scenarios)
16 | - Define Deployment Strategy: Treat configuration as code (Ansible, Terraform, Jenkins, Docker and Kubernetes) and Deploy services independently.
17 | - Scaling to enforce high cohesion and loose coupling (Redundancy / Consistency).
18 | - Availability patterns: **Fail-over** (load balancer, managing traffic and DNS using public IPs or CNAME records), **Database Replication** (Master-slave, master-master), Federation, Sharding, etc
19 | - Consider the **type of data**: Put transactional data into SQL, put JSON documents into a document database, put telemetry data into a time series data base, put application logs in Elasticsearch, and put blobs in Azure Blob Storage.
20 | - Performance: use asynchronous messaging with a pub/sub architecture (Kibana) and backend services using RPC-style messaging protocol.
21 | - Monitoring: use distributed tracing (NewRelic, Splunk) to identify the cause of the failure (Traces should include a correlation ID).
22 |
23 | ## Amazon Dashboard
24 |
25 | - Define Objective/Requeriments
26 | * Create a Search textbox for products
27 | - Define Limitations
28 | * Ranking system
29 | * Number of products (database)
30 | * Number of categories (database)
31 | * Number of write Transactions per month
32 | * Number or read Transactions per month
33 | - Out of Scope
34 | * Suggestions
35 | * Infinite scrolling
36 | - Actions/Actors
37 | * Users (JWT roles)
38 |
39 | ## Facebook Fake Accounts
40 |
41 | - Design a system that allow people to report fake accounts on Facebook
42 |
43 | ## Remember
44 | - Are there any details I need?
45 | - Are there any restrictions?
46 | - What are all the major parts?
47 | - Then, refine as much as possible.
48 |
49 | ## Credits:
50 | - [The System Design Primer](https://github.com/donnemartin/system-design-primer)
51 | - [Ten design principles for Azure applications](https://docs.microsoft.com/en-us/azure/architecture/guide/design-principles)
52 | - [Evaluating Software Architectures for Real-Time Systems](https://www.researchgate.net/publication/220300661_Evaluating_Software_Architectures_for_Real-Time_Systems)
53 | - [Architect's Guide to Frontend Frameworks](https://youtu.be/HI2vFGxiwkM)
54 | - [BrowserDiet](https://browserdiet.com) - How to lose weight in the browser
55 | - [System design: Como empezar el diseño de un sistema](https://youtu.be/kZNr1RfHhow)
56 | - [AWS Whitepapers & Guides](https://aws.amazon.com/whitepapers/) - AWS technical content authored by AWS and the AWS community (technical guides and reference architecture diagrams).
57 | - [Browse Azure Architectures](https://docs.microsoft.com/en-us/azure/architecture/browse/) - Architecture diagrams and technology descriptions for reference architectures, real world examples of cloud architectures.
58 | - [Azure Cloud Design Patterns](https://docs.microsoft.com/en-us/azure/architecture/patterns/) - useful design patterns for building reliable, scalable, secure applications in the cloud.
59 |
--------------------------------------------------------------------------------
/COVER_LETTER.md:
--------------------------------------------------------------------------------
1 | ## Cover Letter
2 |
3 | **[Date]**
4 |
5 |
6 | **[Contact/Team Name]**\
7 | **[Contact Role]**\
8 | **[Company Name]**\
9 | **[Company Address]**
10 |
11 | To Whom It May Concern:
12 |
13 | I am an experienced Software Engineer with a background in web and mobile development, having 9+ years of practice and leadership building interactive experiences. I am writing to apply for the position of **[Role Name]** at **[Company Name]** posted in **[LinkedIn/StackOverflow/etc]**. As a huge fan of **[Field Name]** and also because Technology is changing all of the time, and I feel the skills, qualities and values I possess are a good match **[for your company/to your growing team]**.
14 |
15 | ### Work History/Results
16 |
17 | **[Company Name]**'s commitment to **[Field Name]** is of particular interest to me because of my passion for **[Field Name]** development. I currently serve as a **[Current Role Name]** for **[Current Company Name]**, where I work closely with the **[Current Team Name]** team on a number of high-priority cases. During my time here, I **[implemented/designed]** a new **[Nice Feature/System Name]** that ensures **[Feature/System Benefit]**. This **[Feature/System]** has prevented **[missed deadlines/bad experiences]** and **[helped/allowed]** for better **[Results]**.
18 |
19 | Previously, as a **[Role Name]** for the **[Company Name]**, I received praise for my overall support of the **[Name Team]** and my positive attitude.
20 |
21 | Additionally, in my role as **[Role Name]**, I led our team in creating a **[Strategy/Responsability]** to drive our **[Effort Name]** efforts and promote our **[Solution Name]** on platforms including **[Platforms]**. With so many frameworks and technologies each day, I had to continually be creative in my approach to developing and delivering solutions that would be compelling and effective. As result of my efforts, our **[Team/Project Name]** experienced a **[Percentage]** increase in our **[Program Name]**.
22 |
23 |
24 | Optional
25 |
26 | I am very hard working, always looking to improve my skills and research about new **[strategies/technologies]** to figure out new ways to do my job better, and also I am someone who is completely commited to building the best software products for the world.
27 |
28 | I would love to be part of a great team when we're making a great impact solving interesting challenges, always we need the help of others, and with my experience I feel I have a lot to offer in regard to technical expertise and my passion to a shared goal.
29 |
30 | I am very good at what I do because of my discipline and commitment, I know that if I'm part of your team I will start to contribute positively to the team's objectives quickly, always with the best attitude. I'm excited at the prospect of bringing the skills I developed through this experience to the **[Role Name]** at **[Company Name]**.
31 |
32 |
33 | - Option A:
34 | I would love the opportunity to discuss how I can contribute to your team. Thank you in advance for your consideration, and I look forward to hearing from you.
35 |
36 | - Option B:
37 | For a greater illustration of my background and qualifications, please review my enclosed resume, I am eager to speak with you about this opportunity and thoroughly appreciate your consideration.
38 |
39 | Sincerely,\
40 | **[Name]**\
41 | **[Email]**\
42 | **[Phone Number]**
43 |
44 | ## Resume/CV
45 | - [Resume/CV Template by @vmoratog and @jdnichollsc](https://codepen.io/pen/?template=LYbdpXW)
46 | - [Emiliano Viscarra Resume](https://techeria.co/static/files/ba9de3c1408eee9e62e16592cf8367bf/Emiliano-Viscarra-Resume.pdf)
47 |
48 | ## Credits
49 | - [The Ultimate Software Engineer Resume Guide](https://arc.dev/resume)
50 | - [Harvard Resumes, CVs, Cover Letters templates](https://ocs.fas.harvard.edu/resumes-cvs-cover-letters)
51 | - [Harvard Action Verbs](https://hls.harvard.edu/bernard-koteen-office-of-public-interest-advising/opia-job-search-toolkit/action-verbs/)
52 | - [The Best Cover Letter Examples for Every Type of Job Seeker](https://www.themuse.com/advice/cover-letter-examples-every-type-job-seeker)
53 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | When contributing to this repository, please first discuss the change you wish to make via issue,
4 | email, or any other method with the owners of this repository before making a change.
5 |
6 | Please note we have a code of conduct, please follow it in all your interactions with the project.
7 |
8 | ## Pull Request Process
9 |
10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a
11 | build.
12 | 2. Update the README.md with details of changes to the interface, this includes new environment
13 | variables, exposed ports, useful file locations and container parameters.
14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this
15 | Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
16 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
17 | do not have permission to do that, you may request the second reviewer to merge it for you.
18 |
19 | ## Code of Conduct
20 |
21 | ### Our Pledge
22 |
23 | In the interest of fostering an open and welcoming environment, we as
24 | contributors and maintainers pledge to making participation in our project and
25 | our community a harassment-free experience for everyone, regardless of age, body
26 | size, disability, ethnicity, gender identity and expression, level of experience,
27 | nationality, personal appearance, race, religion, or sexual identity and
28 | orientation.
29 |
30 | ### Our Standards
31 |
32 | Examples of behavior that contributes to creating a positive environment
33 | include:
34 |
35 | * Using welcoming and inclusive language
36 | * Being respectful of differing viewpoints and experiences
37 | * Gracefully accepting constructive criticism
38 | * Focusing on what is best for the community
39 | * Showing empathy towards other community members
40 |
41 | Examples of unacceptable behavior by participants include:
42 |
43 | * The use of sexualized language or imagery and unwelcome sexual attention or
44 | advances
45 | * Trolling, insulting/derogatory comments, and personal or political attacks
46 | * Public or private harassment
47 | * Publishing others' private information, such as a physical or electronic
48 | address, without explicit permission
49 | * Other conduct which could reasonably be considered inappropriate in a
50 | professional setting
51 |
52 | ### Our Responsibilities
53 |
54 | Project maintainers are responsible for clarifying the standards of acceptable
55 | behavior and are expected to take appropriate and fair corrective action in
56 | response to any instances of unacceptable behavior.
57 |
58 | Project maintainers have the right and responsibility to remove, edit, or
59 | reject comments, commits, code, wiki edits, issues, and other contributions
60 | that are not aligned to this Code of Conduct, or to ban temporarily or
61 | permanently any contributor for other behaviors that they deem inappropriate,
62 | threatening, offensive, or harmful.
63 |
64 | ### Scope
65 |
66 | This Code of Conduct applies both within project spaces and in public spaces
67 | when an individual is representing the project or its community. Examples of
68 | representing a project or community include using an official project e-mail
69 | address, posting via an official social media account, or acting as an appointed
70 | representative at an online or offline event. Representation of a project may be
71 | further defined and clarified by project maintainers.
72 |
73 | ### Enforcement
74 |
75 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
76 | reported by contacting the project team at jdnichollsc@hotmail.com. All
77 | complaints will be reviewed and investigated and will result in a response that
78 | is deemed necessary and appropriate to the circumstances. The project team is
79 | obligated to maintain confidentiality with regard to the reporter of an incident.
80 | Further details of specific enforcement policies may be posted separately.
81 |
82 | Project maintainers who do not follow or enforce the Code of Conduct in good
83 | faith may face temporary or permanent repercussions as determined by other
84 | members of the project's leadership.
85 |
86 | ### Attribution
87 |
88 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
89 | available at [http://contributor-covenant.org/version/1/4][version]
90 |
91 | [homepage]: http://contributor-covenant.org
92 | [version]: http://contributor-covenant.org/version/1/4/
93 |
--------------------------------------------------------------------------------
/CODING_QUESTIONS.md:
--------------------------------------------------------------------------------
1 | # Coding Questions
2 |
3 | - Don't jump straight into coding, take a few mins to understand the problem and ask any clarifying questions **(but not too long)**.
4 | - Describe your solution to your interviewer and get their thoughts on your solution.
5 | - Think about your algorithm(s) (sorting, divide-and-conquer, dynamic programming/memorization, recursion, etc),
6 | including the complexity and approximate runtime. Ask the interviewer if it's ok or if you should think about something more optimized. Then figure out your data structure (Array, Stack, Queue, Hashset/Hashmap/Hashtable/Dictionary, Tree/Binary Tree, Heap, Graph, Bloom Filter, etc) and implement.
7 | - Importantly, after you have finished writing your code, run through it verbally with your interviewer. This is really important at this point. Does it really do what you think it does? Make sure to read what is there, not what you think is there.
8 | - Test your code, put in an input to see what happens. We’re looking for you to find the bugs yourself and fix anything that comes up
9 | - Restate the complexity. Is it the same, or different to your initial thinking based on what you have actually coded up? Make sure you’re thinking about both space and time
10 | - Optimize. Proactively suggest ways to optimize to the interviewer and get their feedback to ensure what you’re trying to do is not overly complex and is correct, then code it up.
11 |
12 | > Write a simple clean bug free and not over engineering/over complicated code – it's better a simple code that works that an overcomplicated code that doesn’t work – *the simple the better*.
13 |
14 | ## Key points
15 | Key points to be successful in the coding interview:
16 | * Drive the interview; communication is more important than anything so If you need to be quiet to think, that’s great – just let the interviewer know.
17 | * Explored the problem; Talk about what you are doing throughout the interview.
18 | * Reason about your decisions and share your reasoning.
19 | * Think about trade-offs; Find and fix the bugs by yourself.
20 | * Practice under time pressure; Put yourself under time constraints and If possible, have a mock interview with a friend to simulate the interview experience.
21 | * Manage Your Time Effectively; start writing a working solution, then iterate and improve it as you go.
22 | * Break down the problem into logical chunks and solved them
23 |
24 | ## Strings
25 | - What format is the word/values given to us?
26 | - How do we define a nearby word?
27 | - Do we need to remove duplicate words/values in the output?
28 |
29 | ## Arrays
30 | - Does the output need to be sorted?
31 | - Can I expect empty arrays? To avoid edge cases and errors at runtime
32 | - Are they all integers?
33 | - Can I destroy or modify the array?
34 | - Will the array ever be empty?
35 |
36 | ## Binary Trees
37 | - What is the expected type of input values?
38 | - Is it ok to return just integers?
39 |
40 | ## Remember
41 | - Are there any details I need?
42 | - Are there any restrictions?
43 | - Always discuss pitfalls and trade offs
44 | - Do I know everything I need to?
45 | - Can I identify a pattern by drawing it?
46 | - Iterative or recursive?
47 | - Can I try that approach?
48 | - Will I be able to code this approach?
49 | - How can I improve this approach?
50 | - Ask lots of questions, clarify the problem, make sure you know exactly what they are asking you to do and or solve.
51 | - Think out loud: explain your thought process, explain the different ways you are attempting to solve the problem, you need to verbally map out your solutions so the interviewer can understand your thought process. Also, the more the you talk and explain you approaches, the more the interviewer can provide subtle hints on what they are looking for.
52 | - Lastly, turn your verbal solution, into good, clean, concise, bug free code checking for edge cases and corner cases, and even putting together a manual use case if you have time.
53 |
54 | ## Credits:
55 | - [AlgosMed](https://discord.gg/ttMu5az6wM) - Mocking interviews, algorithms, etc
56 | - [Cracking the Coding Interview](https://www.amazon.com/dp/0984782850)
57 |
58 | ### Frontend
59 | - [Front End Interview Handbook](https://github.com/yangshun/front-end-interview-handbook)
60 | - [JavaScript Questions](https://github.com/lydiahallie/javascript-questions)
61 | - [JavaScript Interview Questions & Answers](https://github.com/sudheerj/javascript-interview-questions)
62 | - [70 JavaScript Interview Questions](https://dev.to/macmacky/70-javascript-interview-questions-5gfi)
63 |
64 | ### Backend
65 | - [Back-End Developer Interview Questions](https://github.com/arialdomartini/Back-End-Developer-Interview-Questions)
66 |
--------------------------------------------------------------------------------
/EXPRESSIONS.md:
--------------------------------------------------------------------------------
1 | # Expressions
2 |
3 | ## Behavioral
4 | - As a developer, I look for the opportunity to face new challenges trying to figure out new and more efficient ways to solve problems with technology, to learn with others along the way.
5 | - I'm looking to find a better balanced life, where I have the opportunity to spend time with my family, studying and improving.
6 | - I'm looking to be part of a community where I can meet people, have the opportunity to share ideas, advice and be myself.
7 | - I'm looking for a culture where I can help making decisions, where my ideas are valuable and appreciated.
8 | - I'm looking for the opportunity to work in an open, inclusive team, and always ready to overcome any challenge, where everybody is very supportive to continue growing.
9 | - I'm looking for the opportunity to develop my skills and just grow as a person, where I can be who I really am.
10 | - I want to work with people who really appreciate everything you see around us, where I can take the good of each circumstance as an experience to continue learning.
11 | - I want to be in an environment where I can adapt to new situations as part of the change, where mistakes are seen as an opportunity for improvement.
12 | - I want to work in a place where I can develop self-confidence at my own pace, where I can give myself time to reflect on the past and focus on the future.
13 | - I want to work with people who have an excitement for adventure and the same passion to continue learning.
14 | - I hope to find myself in an environment where every day is different, where I can work with talented people who are equally motivated and curious, where I can live experiences that allow me to find a better version of myself.
15 | - I want to be where I can feel comfortable about not having have the perfect answer to questions and being able to have support from my team to keep improving, because nothing is really perfect.
16 | - I learned to be more careful and not rush my decisions and to speak with others on my team who have more experience if I'm unsure of something.
17 | - I also realized how important each decision is, which made me a better developer/manager in the last few years of my career.
18 | - It was a great lesson to learn early in my career.
19 |
20 | ## Daily Standup
21 | - Yesterday, I started to dig into the ticket ###
22 | - I made good progress on this task here. I think I've got about two hours left.
23 | - We're awaiting for response here, so let’s move on to another task
24 | - I have no blockers from my end
25 | - That's all from my side
26 | - That's it from my part
27 | - I'll keep an eye on it **(me haré a cargo de eso)**
28 |
29 | ## Meetings
30 | - How's it going?
31 | - Can you believe this weather? It's awful!
32 | - Sorry, I've got to run. Talk to you soon.
33 | - I should get going. I'll call you later.
34 |
35 | ## Positive comments!
36 | - Great work so far!
37 | - I couldn't be more excited to be here!
38 | - We can’t do this without all of you, great job team!
39 | - Without of you none of this would be possible today!
40 | - This is so freaking awesome! We're in business!
41 | - I celebrate every time I hear about these success stories
42 |
43 | ## Helpful
44 | - I'm here at the mercy of you!
45 | - Here you go!
46 | - It ain’t much, but it’s honest work
47 |
48 | ## Teamwork
49 | - We'd like to put this on your plate (Por favor encargate de algo)
50 |
51 | ## Confirm
52 | - I'm aware of that.
53 | - I got it (Si yo entiendo).
54 | - I think that's fine for the moment.
55 |
56 | ## Continue discussion
57 | - I really don't remember, let me think in the meantime and let's move on!
58 | - The mic is yours
59 | - Uh that's all I can remember
60 | - He must do a lot of good things
61 | - Well in a nutshell (Pocas palabras)
62 |
63 | ## Apologize
64 | - I'm sorry, I'm late - I got sidetracked.
65 | - I'm sorry, I didn't handle that better.
66 |
67 | ## Open minded attitude
68 | - Hope to see you soon, but feel free to contact me if you have any questions.
69 | - Please come talk to me personally for any concerns
70 | - Please don't hesitate to [contact me/let me know] with any questions!
71 |
72 | ## Future plans
73 | - I want to travel around the world, exist any problem to work from different countries?
74 |
75 | ## Thanks
76 | - Thank you very much for your time, I look forward to hearing from you soon.
77 | - Thanks for your collaboration, have a great day!
78 | - Thanks for understanding and have a great day!
79 |
80 | ## Give Clarifications
81 | - Don’t get me wrong...
82 | - I’m not asking for a miracle here...
83 | - It's not responsible for handling that...
84 | - As simple as that
85 | - As I mentioned earlier...
86 | - So by doing this,
87 | - I understand but the point of this is to introduce...
88 | - But without success so far
89 |
90 | ## Ask for Clarification
91 | - Correct me if I'm wrong...
92 | - I'm not sure about...
93 | - I can go into more details if you'd like?
94 | - Not quite sure what you meant by this...
95 | - Can you please be more specific?
96 | - Can you point me in the right direction?
97 |
98 | ## Questions
99 |
100 | - Can you tell me more about that?
101 | - What do you mean?
102 | - Hmm. Could you give me an example?
103 | - Is there a valid way to do that?
104 | - What do you expect to see in this exercise?
105 | - Shoud the project provide documentation?
106 | - Sorry to interrupt. Could you give me a moment please?
107 | - Are we assuming the time/complexity to fix the problem?
108 | - Could you break it into specific issues?
109 | - How long have you been working together?
110 | - How long ago did you meet she?
111 | - Why don't you go to take a time to rest?
112 | - Is there anything else I can do for you?
113 | - Have you had any of this?
114 | - What have you been up to?
115 | - hmm.. What cud be the next step in your view? Do you want me to check something specific with XXX?
116 | - Do you ever feel too tired to finish something?
117 | - Do you have a special talent for a particular skill or ability?
118 | - What are some things that you don't consider to **be rocket science**?
119 | - What do you **go the extra mile** for?
120 | - Have you ever gotten a **second wind**?
121 | - What do you have **down to a science**?
122 | - Will they be able to **cope with** the work?
123 |
124 | ## Projects
125 |
126 | - From the customer's perspective...
127 |
128 | ## Idioms
129 | - Fortunately, this project isn't **rocket science**.
130 | - Finding a good Co-Founder is rocket science to me, it's like finding a great wife!
131 | - The project's deadline **is set in stone**, we need more developers to be able to fix all issues.
132 | - The schedule isn't **set in stone** (Flexible).
133 | - My boss at that company wasn't very **down to earth** (Unrealistic requests, etc).
134 | - A good colleague is a **down to earth** person with no pretensions.
135 | - He's a nice coworker, always ready **to go the extra mile** for his colleagues.
136 | - I feel proud when I felt tired after many hours of work, but I **got the second wind** and finished a lot because I'm so excited with the project, especially when this's a side project!
137 | - I stayed up all night to got the second wind when preparing for the exam.
138 | - I have my work routine **down to a science**, I have more time to research and still improving myself.
139 | - My wife have making brownies technique **down to a science**.
140 | - Government spend **the lion's share** of our taxes on rich companies instead of people.
141 | - Most companies have reported about **a very wide range of** information about Coronavirus and working remotely strategies.
142 | - As the company's work environment problems worsened, several colleagues **resigned**.
143 | - I **resigned** from that company in order to take a more challenging job and having the opportunity to improve my english.
144 | - The schedule is set in stone, it's only a matter of time before you're forced to **resign**.
145 | - You seems **to thrive** on hard work, that's not my case.
146 | - They are offering a **trial** of the platform while the quarantine finish.
147 | - Because of Covid Friday, most of Colombians are in **debt** to the bank.
148 | - Because of good decisions, the company isn't deep in **debt**.
149 | - Get a good night's sleep and you'll feel better able to **cope**.
150 |
--------------------------------------------------------------------------------
/CODING_CONCEPTS.md:
--------------------------------------------------------------------------------
1 | ## Dynamic Programming
2 | Dynamic Programming (DP) is a similar approach to Divide & Conquer. It also breaks the problem into similar subproblems, but they are actually overlapping and codependent — they’re not solved independently.
3 | Each subproblem’s result can be used anytime later and it is built using memoization (precalculation). DP is mostly used for (time & space) optimization and it is based on finding a recurrence.
4 |
5 | ## Big O Notation
6 | A method which describes algorithm complexity, the execution time required or the space used in memory by an algorithm, where "n" represents size of the data structure.
7 |
8 | ### Time complexity
9 | Describe the rough estimate of the number of "steps" to complete the algorithm.
10 |
11 | - **Rules:**
12 | * O(1) * O(n) = O(n) ------------ do something n times => loop
13 | * O(n) * O(n) = O(n^2) ------------ outer loop runs n times * inner loop runs n times (nested loop)
14 | * O(1) + O(n) = O(n) ------------ constant time + loop
15 | * O(n) + O(n^2) = O(n^2) ---------- loop + loop with nested loop
16 | * O(1) + O(n) + O(n^2) = O(n^2)
17 | * O(1) + O(n/2) + O(100) = O(n) --- As n gets really big, any operation has a decreasingly significant effect
18 | * O(n^3 + 50n^2 + 10000) = O(n^3)
19 | * O((n+30) * (n+5)) = O(n^2)
20 |
21 | > Assuming "n" becomes very large, the notation with slower increase speed could be ignored 🐌 (as the nature of large scale data in computer engineering, everything else is quickly eclipsed as n gets very large)
22 |
23 | - **Speed:** `O(1) < O(log(n)) < O(n) < O(n log(n)) < O(n^2)`
24 |
25 | - **Sort Algorithms (Worst case):**
26 | * Mergesort, Timsort, Heapsort = `O(n log(n))`
27 | * Quicksort, Bubble Sort, Insertion Sort, Selection Sort = `O(n^2)`
28 |
29 | ### Space complexity
30 | About memory cost, to optimize an algorithm for using less memory.
31 | When comparing different algorithms, we often compare how much "extra" space complexity is needed to solve the problem.
32 | In an algorithm, we need to create an array of size n to store the temporary results before getting the final result. If we assume that the size of a element in the array is a constant "C" which is independent to "n", the space complexity for using the array is Cn which is `O(n) * O(C) = O(n) * O(1) = O(n)`
33 |
34 | > O(1) space complexity if more efficient than O(n)
35 |
36 | - **Data Structures:**
37 | * Array, Stack, Queue, Hash Table, BST = `O(n)`
38 | * Skip list = `O(n log(n))`
39 | - **Sort Algorithms:**
40 | * Heapsort, Bubble Sort, Insertion Sort, Selection Sort = `O(1)`
41 | * Quicksort = `O(log(n))`
42 | * Mergesort, Timsort = `O(n)`
43 |
44 | ## LIFO
45 | Last In, First Out, e.g: Stacks
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | ## FIFO
54 | First In, First Out, e.g: Queues
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | ## Call stack
63 | A stack data structure that stores information about the active subroutines of a computer program. (also known as an execution stack, program stack, control stack, run-time stack, or machine stack). It's used to keep track of the point to which each active subroutine should return control when it finishes executing. An active subroutine is one that has been called, but is yet to complete execution, after which control should be handed back to the point of call.
64 | ## Graphs
65 | Graphs are used to represent networks. It's a data structure that consists of the following two components:
66 | - A finite set of vertices also called as nodes.
67 | - A finite set of ordered pair of the form (u, v) called as edge. The pair of the form (u, v) indicates that there is an edge from vertex u to vertex v. The edges may contain weight/value/cost.
68 | Example:
69 | ```sh
70 | (u, v)
71 | [0] -- [1]
72 | | / \
73 | | / [2]
74 | | / /
75 | [4] -- [3]
76 | ```
77 | ### Adjacency Matrix
78 | A 2D array of size V x V where V is the number of vertices in a graph (used to represent weighted graphs). e.g:
79 | ```ts
80 | [[0, 1, 0, 0, 1],
81 | [1, 0, 1, 0, 1],
82 | [0, 1, 0, 1, 0],
83 | [0, 0, 1, 0, 1],
84 | [1, 1, 0, 1, 0]];
85 | ```
86 | * Consumes more space O(V^2).
87 | * Adding a new vertex the storage must be increases to (|V|+1)^2, complexity is O(V^2).
88 | * Adding an edge requires O(1) time.
89 | * Removing a vertex the storage must be decreased to V^2 from (|V|+1)^2, complexity is O(V^2).
90 | * Removing an edge takes O(1) time.
91 | * Finding for an existing edge, given two vertices, can be checked in O(1) time.
92 | ### Adjacency List
93 | A graph is represented as an array of linked list. The size of the array is equal to the number of vertices.
94 | ```ts
95 | [
96 | [1, 4],
97 | [0, 2, 4],
98 | [1, 3],
99 | [2, 4],
100 | [0, 1, 3]
101 | ];
102 | ```
103 | * Saves space O(|V|+|E|).
104 | * Adding a vertex is easier O(1).
105 | * Adding an edge requires O(1) time.
106 | * Removing a vertex takes O(|V|+|E|) time (search for the vertex and traverse the edges).
107 | * Removing an edge takes O(|E|) time (traversing through the edges).
108 | * Queries like whether there is an edge from vertex u to vertex v are not efficient and can be done O(V).
109 |
110 | ## Tree traversal (walking the tree)
111 | Refers to the process of visiting (checking and/or updating) each node in a tree data structure, exactly once. As a tree is a self-referential (recursively defined) data structure, traversal can be defined by recursion or, more subtly, corecursion, in a very natural and clear fashion; in these cases the deferred nodes are stored implicitly in the call stack.
112 | ### Traversing a tree
113 | Involves iterating over all nodes in some manner:
114 |
115 | 
116 |
117 | #### Depth-first search (DFS)
118 | Starts at the root node and explores as far as possible along each branch before backtracking, with a DFS you push the children of the current node onto a stack, so they will be popped and processed before everything else. It's easily implemented via a stack, including recursively via the call stack:
119 | * Pre-order (NLR): It's a topologically sorted one, because a parent node is processed before any of its child nodes is done.
120 | * In-order (LNR): Retrieves the keys in ascending sorted order.
121 | * Reverse in-order (RNL): Retrieves the keys in descending sorted order.
122 | * Post-order (LRN): The trace of a traversal is called a sequentialisation of the tree. The traversal trace is a list of each visited root.
123 | #### Breadth-first search (BFS)
124 | Starts at the tree root and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level, with a BFS you push the children onto the end of a queue, so they will be popped and processed after everything else. It's easily implemented via a queue, including corecursively.
125 |
126 | ## Credits:
127 | - [Tech Interview Handbook](https://yangshun.github.io/tech-interview-handbook)
128 | - [Coding Interview University](https://github.com/jwasham/coding-interview-university)
129 | - [Complete Introduction to the 30 Most Essential Data Structures & Algorithms](https://dev.to/iuliagroza/complete-introduction-to-the-30-most-essential-data-structures-algorithms-43kd)
130 | - [Introduction to Big O Notation and Time Complexity](https://youtu.be/D6xkbGLQesk)
131 | - [To study runtime complexity: Big O Cheat Sheet](https://www.interviewcake.com/article/python/big-o-notation-time-and-space-complexity)
132 | - [The ultimate guide for data structures & algorithm interviews](https://dev.to/rahhularora/the-ultimate-guide-for-data-structures-algorithm-interviews-npo)
133 | - [OOP Principles For Dummies](https://dev.to/tamerlang/oop-principles-for-dummies-2mbd)
134 | - [Graph Algorithms](https://github.com/kdn251/interviews#graph-algorithms)
135 | - [Queues and Stacks](https://thagomizer.com/blog/2016/05/06/algorithms-queues-and-stacks.html)
136 |
--------------------------------------------------------------------------------
/1_1_QUESTIONS.md:
--------------------------------------------------------------------------------
1 | # 1:1 Questions
2 |
3 | - On a scale of 1-10, rate your overall satisfaction with your employment at this company.
4 | - What is the number one reason you get out of bed in the morning and come to work?
5 | - List three items you would like to have for your desk if budget was not a concern.
6 | - Is there any topic that comes up during the day that you feel confused or unclear about?
7 | - Is there anyone specifically that you have a hard time working with for any reason?
8 | - Do you feel challenged on a daily basis?
9 | - Do you feel competitive with your coworkers, or is it more of a teamwork environment?
10 | - Is there anyone within the company that you look up to, and why?
11 | - Is this job providing you with a good overall work/life balance?
12 | - Tell me your thoughts on my management style.
13 | - Do you feel like your education is being put to its maximum use in your position?
14 | - Are you proud of your work? What could we do to make you feel more pride in your job?
15 | - How can we change our staff meetings to make them more productive?
16 | - Tell me about your greatest accomplishment while employed here.
17 | - Would you like to work at home occasionally if that was offered to you?
18 | - How much longer will you be satisfied in your current position before receiving a promotion?
19 | - On a scale of 1-10 how much time do you feel is wasted in your day? What could we do to be more efficient?
20 | - Do you feel obligated to participate in any office activities that you would rather not be a part of?
21 | - As managers, what can we do to give your workday more direction?
22 | - If you were to receive a compensation increase, would you prefer higher pay or more benefits?
23 | - What three simple things could make your work days more enjoyable?
24 | - Describe a scenario that has arisen in your job that you don't feel you have the proper tools to handle effectively.
25 | - What would it take for you to leave this job for a new position?
26 | - Have you thought of any special projects that you would enjoy working on if given the opportunity?
27 | - Describe in detail the first hour of your normal work day.
28 | - Describe in detail the last hour of your normal work day.
29 | - Is there someone in the office that you would like to work more closely with?
30 | - Name something you do on a daily basis at work that you feel does not get enough attention or credit.
31 | - Do you want to be more involved in decision making, or do you prefer to enact the decisions of others?
32 | - Present me with a situation that you would like to know my response to.
33 | - List three things that you think the company as a whole should do to be more competitive.
34 | - What specific functions would you train a new employee on first?
35 | - In general, do you feel you are given enough opportunities to advance your career? If not, what more could be done to help move you towards your goals.
36 | - What is your personal opinion of the long term outlook for this company?
37 | - Do you see any market opportunities that the company is not taking advantage of?
38 | - What chances would you like to be given to feel more apart of the decision-making process?
39 | - What is one thing that could be done to make you feel more 'at home' in the office?
40 | - Who in the office do you think has knowledge that you could benefit from?
41 | - What are your big dreams in life? Is this job getting you closer to reaching them?
42 | - Have any outgoing employees expressed specific issues to you? What were they?
43 | - Do you feel the work is evenly distributed across the team? Is there anyone carrying too much? What are some ways we could even things out?
44 | - Are you uncomfortable giving any of your peers constructive criticism? If so, why?
45 | - What is something we could do as a team to improve the company?
46 | - What is an example of a "little thing" that really impressed you recently? (For example, great customer service or a well-designed product.)
47 | - Do you think the salary possibilities within this company are enough to satisfy you long term?
48 | - Tell me about a recent situation you wish you would have handled differently.
49 | - List 2 things that you see being done inefficiently around the office. Is it worth making them more efficient? Why or why not?
50 | - If you sat in on an interview for a prospective employee, what one question would you ask them?
51 | - If you were to give yourself a rating (1-10) today, what would it be?
52 | - In your opinion, is the staffing level in the office sufficient to keep up with the workload?
53 | - What about the physical arrangement of the office do you like? What would you change?
54 | - Tell me about the last time you felt proud of yourself to solving a problem on the job.
55 | - Is the job you perform on a daily basis what you expected when you took it?
56 | - Pick a question to ask your manager about their background or career. [this one is for the you to come up with!]
57 | - What's the best compliment you've ever received at work? [this one's for your manager to ask! phew, back to normal.]
58 | - List 3 things you would like to see when you come to work every day.
59 | - Is this job fitting in well with your life as a whole?
60 | - Are you happy that you left your previous job for this one?
61 | - How long can you see yourself working here?
62 | - Are you having fun? Tell me about the most fun you've had working here.
63 | - What is most important to our business -- mission, core values, or vision?
64 | - What are you doing really well that is moving you towards your career goals?
65 | - What parts of the business would you like to be more involved in or learn more about?
66 | - Sometimes an organization gets so focused on the tactical and day-to-day that they forget to take time to focus on being creative and fostering innovative ideas. What can we do to be more creative and innovative?
67 | - How often do people ask you for help? What do they ask for and how long does it take you?
68 | - Do you enjoy office functions (parties, dinners) or would you rather be rewarded in some other way?
69 | - How well-received do you feel your opinions are when you offer them up?
70 | - What goals do you feel like you have accomplished professionally since you began work here?
71 | - In what ways could we improve communications around the office?
72 | - On a scale of 1-10 what level of loyalty do you feel to the company as a whole?
73 | - Name the first two things you would do if you were put in charge for a day.
74 | - What is one thing we could do to make the office more comfortable/enjoyable/fun (or just better) without spending much money?
75 | - How well do you feel like you relate to you coworkers? Do you view them as friends?
76 | - Do you feel like you receive feedback often enough?
77 | - Who do you really admire?
78 | - What makes for a great day at work?
79 | - If money were no object, what would you do every day?
80 | - How often do you think staff meetings are needed to keep everyone on the same page?
81 | - Are you making as much money now as you hoped when you accepted the job?
82 | - List the top three things that you feel waste time during your day.
83 | - Without naming anyone specifically, do you know of anyone in the office that is unhappy?
84 | - If the need should arise, do you feel comfortable filling any roles other than your own in the office?
85 | - Have you been asked to do anything as part of your job that pushed your out of your comfort zone?
86 | - From a resources standpoint, is there anything that would help you do your job better?
87 | - Speaking honestly, what is one criticism you would have for me?
88 | - When have you had the most fun at work? (And it doesn't have to be this company! It can be past roles too.)
89 | - Generally speaking, are you happy being employed here?
90 | - What are 1 or 2 things in our team that could be done more efficiently?
91 | - What is one thing that I, or the company, could to do support you in achieving your goals?
92 | - How could your working hours be adjusted to better fit your schedule?
93 | - When was the last time you got stuck and needed help at work? Who/what helped you get unstuck?
94 | - What part of your job do you enjoy the most? And which part do you enjoy least?
95 | - What is one thing we aren't currently doing, but could be doing to grow the business?
96 | - What part of your job do you wish you didn't have to do?
97 | - What are your top 3 super powers?
98 | - What is the biggest challenge we will face this year?
99 | - Tell me about your long term career goals.
100 | - What is a mistake you made recently that you learned a lot from?
101 | - Are there any areas of your job that you would like additional training in?
102 | - Tell me about one coworker that you feel does a particularly good job.
103 | - List three things that motivate you to do your work each day.
104 | - What is one thing that I could do to make you more productive?
105 | - What did you want to be when you grew up?
106 |
107 | ## Credits:
108 | - [@buritica](https://github.com/buritica)
109 |
--------------------------------------------------------------------------------
/SALARY_NEGOTIATION.md:
--------------------------------------------------------------------------------
1 | ## What is your salary expectation?
2 |
3 | ### Examples
4 | > So you know what you need, how badly you need it, what you're willing to pay for it?
5 |
6 | > You know I really don't know. I don't have a number in mind right now. I'd like to think about the value that I can add to this firm and this team. I'm excited for this opportunity based on what I know about it. And I can't wait to learn more about it and continue talking to people in the interview process.
7 |
8 | > You know I'm really not comfortable sharing my current salary and what my employer pays people that do the kind of work that I do, and I'd rather focus on the value that I can add in this position. And I'm really looking forward to this move being a big step forward for me in terms of both responsibility and compensation and I can't wait to talk about the position and the opportunity that's ahead of me.
9 |
10 | > I don’t have a specific number in mind for a desired salary, and you know better than I do what value my skillset and experience could bring to your company. I want this move to be a big step forward for me in terms of both responsibility and compensation.
11 |
12 | > Before I give you a number, I'd like to understand how you compensate employees and how this job fits into your compensation structure. I'm curious to know the salary grade for this position, the salary range and midpoint for that grade, and where that grade fits into your compensation system? That will give me a better idea of how this position fits into your structure and my career plans.
13 |
14 | > Before I give you a number, I'd like to understand more about company, the work environment, the requirements of the job, and other important considerations like the opportunity for growth. Then, I'll have a better idea what an appropriate salary would be.
15 |
16 | > I need to understand and evaluate the total compensation package before I give you a salary number. Could you share the standard benefits you provide?
17 |
18 | > Thank you for that question. On this stage let us check first that we are a great fit for each other and we could circle back to that questions later.
19 |
20 | > Thank you for that question. Hey, I'm just an engineer, I'm sure you know the market better than me so I trust you to evaluate my skill set first and if we are a great fit to circle back to that topic.
21 |
22 | > Listen, you need somebody to do this job. I'm somebody who can do that job. Let me describe to you how well I can do that job and how well I understand what your needs are. And then we can talk about what's the appropriate price for you to pay me to do that job. And we can collaborate to find something that we both feel is good.
23 |
24 | > I don't have one. Look, I know you want to be fair. You have salary ranges for employees with a given skillset and responsibility, right? I don't want to be paid less than everybody else. I don't want to be paid more than everybody else. Just give me something in the middle.
25 |
26 | ## They offer a lower salary
27 |
28 | > Thank you, my current salary rate is higher, but you could always call me back at any time if you still think we are a great fit for each other.
29 |
30 | > Hello, thanks for reaching me out!
31 | The offer you're sharing with me sounds very interesting, but my salary expectations are higher.
32 | Thanks for sharing and let's keep in touch for a next opportunity!
33 | Have a great day
34 |
35 | > 🇪🇸 🇨🇴 Hola, gracias por compartir!
36 | Realmente el rango salarial está por debajo de mis expectativas, de todas formas gracias por contactarme y espero que podamos seguir en contacto para una próxima oportunidad!
37 | Feliz día 🙂
38 |
39 | ## They offer an equal salary
40 |
41 | > Thank you, I think we are on the same page in terms of salary ranges but let us circle back to that conversation later after we will check how good is our mutual fit.
42 |
43 | ## They ask for a call first
44 |
45 | > Thanks so much for reaching out. I'm always interested in hearing about what new and exciting opportunities are out there. As a software engineer I'm sure you can imagine that I get a very high volume of recruiters reaching out on LinkedIn. It is a wonderful position of privilege to be in and I'm thankful for it.
46 | It does however mean that I don't have the time to hop on a call with everyone who reaches out. A lot of the time, incoming messages represent a very poor fit indeed.
47 | I would love to continue the conversation, but before I do, I'd like to level set around the level of seniority that you're looking for.
48 | Can you send along the company name, a job description and, total compensation details for the role you're reaching out in reference to?
49 | While I very much appreciate the fact that exceptionally talented and engaged recruiters reach out consistently, sorting serious and high quality opportunities from spam would be a full time job without an autoresponder.
50 | In the absence of detailed information regarding the nature of the opportunity in question, I will be unavailable for further discussion.
51 | Thanks again for reaching out!
52 | I look forward to hearing from you.
53 |
54 | > Thank you for contacting me.
55 | It sounds very interesting.
56 |
57 | > Hello, hope you're doing well.
58 | Sounds interesting, can you share the description of this job opportunity please? And can you tell me about the salary range you have budgeted for this role?
59 | Thanks for sharing!
60 |
61 | > 🇪🇸 🇨🇴 En el momento me están contactando de varias partes, por lo tanto quisiera saber de inicio cuál es el rango salarial presupuestado para este rol, como sería el tipo de contrato y que beneficios/perks ofrecen ustedes?
62 | Gracias por compartir!
63 |
64 | ## They don't offer a salary range
65 |
66 | > **I need a number to fill a form:** Just put a dollar so we could circle back to that later.
67 |
68 | > Thanks for letting me know, I am seeking a base pay of $XX,XXX **(HIGHER END OF YOUR RANGE)**, but I can be flexible depending on the benefits and any incentives you may offer, please let me know if that salary range works for you 🙂
69 |
70 | > Based on my research and the information you have provided, I believe that a salary in the range of $XX,XXX to $XX,XXX with [# of weeks of] paid vacation, [other benefits important to you which have been stated as included], and your other benefits would be appropriate.
71 |
72 | > 🇪🇸 🇨🇴 Hola! entiendo completamente, actualmente mi aspiración salarial es de $XXXXXX USD en adelante **(El valor más alto de tu rango)**, pero soy flexible dependiendo de los beneficios que ustedes ofrezcan, déjame saber si este rango salarial está bien para ustedes.
73 |
74 |
75 | ## “What is your current salary?”
76 | - [It's a red flag](https://dev.to/jmfayard/what-is-your-current-salary-is-a-red-flag-that-you-don-t-want-to-work-here-3aji)
77 |
78 | ### Examples
79 | > Oh, yeah, I was going to ask you, do you know the budget for the role?
80 |
81 | > What other things might be open to negotiation besides the base salary? For example, would you be amenable to offer a sign-on bonus?
82 |
83 | > You guys know the market and are good at what you do, I trust you to make a great offer if you're interested.
84 |
85 | > I'm not prepared to discuss numbers yet, but if we each decide that we're a good fit, I'm sure we'll find something we are happy with.
86 |
87 | > Hello, XYZ. Thanks for reaching out. This sounds like an interesting opportunity, but I'd like to be respectful of your time. May I ask about the salary (range is fine) and benefits plan beforehand?
88 |
89 | > Why is it relevant? ... Ah, I see. Thanks for the clarification. Look, I want to be transparent: If you were to make me an offer, it's unlikely I would accept it. Your company isn’t a great fit for me at this time. So I don't want to waste more of your time. But if you wind up brushing up on your interviewing process and making improvements, feel free to reach out to me again for consideration **(10x DEVELOPER)**
90 |
91 | > **I am unable to provide my current salary**: As I am sure you understand, my employer considers employee salaries to be confidential, and access to this information is limited to management inside our organization. So, I am unable to share it with you. However, if you share the salary level and range for this position, I can confirm that my salary is within that range or not. I'm sure you'll understand me cause if we would work together and will have any private conversations with you the company could be sure 'll never disclose it as well.
92 |
93 | > I don't think that my current salary is relevant, but if you must have that information, I will provide it after you share the salary level and range for this job.
94 |
95 | > I **will** share my salary expectations with you, and we can see if it fits into your salary range for this position.
96 |
97 | > I have done my initial homework, and salary information on the Internet indicates I’m in the range. For now we should assume that salary won’t be an issue. Plus, I need to understand the full extent of the opportunity and the benefits you provide to employees plus what the salary range is for this role.
98 |
99 | > Sharing my current salary is inappropriate for me. I'm expecting to be compensated conmesurately with my experience and the role that I’ll have at this company.
100 |
101 | Understand that "your mileage may vary." If the employer isn’t very interested (or has many other people they could hire), they probably won’t do much negotiation. If they are very interested in you, they will negotiate. Many employers expect to negotiate starting salaries. However, some do not want to negotiate and may even withdraw a job offer if pressed for a higher starting salary.
102 |
103 | ## They can't move forward
104 |
105 | > Thanks for letting me know, I understand! Thanks for sharing and let's keep in touch!
106 |
107 | ## Benefits/Perks
108 | - Signing bonus (only increasing the first year income)
109 | - Monthly bonuses (Sodexo Pass)
110 | - Annual, quarterly, or other bonuses
111 | - Commissions (usually for sales jobs)
112 | - Stock, a stock purchase plan, and/or stock options
113 | - Annual (or more frequent) salary increases
114 | - Vacation days
115 | - Personal days
116 | - Sick days
117 | - 401K and/or pension
118 | - Medical insurance
119 | - Life insurance
120 | - Dental insurance
121 | - Vision insurance
122 | - Working from home
123 | - Flexible hours (Schedule flexibility)
124 | - Training
125 | - Tuition reimbursement
126 | - English coaching
127 | - Parking or public transportation reimbursement
128 | - Career Path and Career Growth (Udemy account, etc)
129 | - Competitive compensation
130 | - Company car, culture, etc
131 |
132 | ### Remember
133 | - Be assertive
134 | - Take the lead
135 | - Remember they need you
136 | - Be confident
137 | - Come prepared
138 | - Talk, but also listen
139 | - Be professional, but losen up a bit
140 | - Be amicable
141 | - Keep eye contact
142 | - Remind then why you are there
143 | - Make them talk about why they need you
144 |
145 | ## What are your hourly rate expectations?
146 | I'm absolutely comfortable somewhere in the top quartile of my market value. I'm happy to email you tonight the latest report with information about my market value **(Cost of Living)**:
147 |
148 | - https://www.salary.com/
149 | - https://www.glassdoor.com/Salaries
150 | - https://www.payscale.com/
151 | - https://www.levels.fyi/
152 | - https://www.teamblind.com/salaryComparison#inputSalary
153 | - https://money.cnn.com/calculator/pf/cost-of-living/
154 |
155 | ## Promotions
156 |
157 | > Hey I've already been doing this for a while. I don't know if you noticed but I have been. Here's the work that I've been doing. Any chance we could talk about making this official with a promotion?
158 |
159 |
160 | ## Credits
161 | - [@uxDaniel](https://github.com/uxDaniel)
162 | - [Tips for negotiating your salary (from an ex-FAANG recruiter)](https://youtu.be/u9BoG1n1948)
163 | - [The Trimodal Nature of Software Engineer Compensation: Why Positions Pay a (Very) Different Salary](https://youtu.be/h8Xpapy6I9E)
164 | - [Negotiating Your Salary and Advancing Your Career with Josh Doody](https://egghead.io/podcasts/negotiating-your-salary-and-advancing-your-career-with-josh-doody)
165 | - [Salary Negotiation for Software Developers](https://egghead.io/talks/egghead-egghead-talks-salary-negotiation-for-software-developers)
166 | - [The Basics of Salary Negotiation](https://dev.to/recursivefaults/the-basics-of-salary-negotiation-1ddg)
167 | - [Make me an offer](https://dev.to/jmfayard/what-is-your-salary-expectation-a-i-don-t-have-one-make-me-an-offer-2jaf)
168 | - [5 Salary Negotiation Rules for Software Developers](https://dev.to/fullstackcafe/5-salary-negotiation-rules-for-software-developers-get-20-on-top-of-your-market-rate-2jii)
169 | - [As an interviewee this is the most important thing to remember](https://twitter.com/svpino/status/1289431085525295105)
170 | - [Career Advice Nobody Gave Me: Never Ignore a Recruiter](https://index.medium.com/career-advice-nobody-gave-me-never-ignore-a-recruiter-4474eac9556)
171 | - [Negociar Sueldo](https://slides.com/xthecapx/negociar-sueldo) 🇪🇸 🇨🇴
172 | - [Como ganar en el juego de la negociación - Harvey Mackay](https://youtu.be/pYoqvMutWNM?t=38) 🇪🇸 🇨🇴
173 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
The Job Interview Guide 💼
2 |
3 |
4 |
5 | And English is a Work in Progress ⌛
6 |
7 |
8 |
9 |
10 | > Based on the [Gist](https://gist.github.com/jdnichollsc/b9bedff406b54c3ae2cd651512683b51), thanks to everyone who collaborated in this project! <3
11 |
12 | ## Practice
13 |
14 | - [English useful expressions](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/EXPRESSIONS.md)
15 | - [Interview Warmup](https://grow.google/certificates/interview-warmup/) - A quick way to prepare for your next interview.
16 |
17 | ## Behavioral Interview
18 | - [The STAR Method](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/BEHAVIORAL_CONCEPTS.md)
19 | - [Remember](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/BEHAVIORAL_QUESTIONS.md#remember)
20 | - [Questions](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/BEHAVIORAL_QUESTIONS.md)
21 |
22 | ## Coding Interview
23 |
24 | ### Concepts
25 | - [Dynamic Programming](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#dynamic-programming)
26 | - [Big O Notation](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#big-o-notation)
27 | - [LIFO](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#lifo)
28 | - [FIFO](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#fifo)
29 | - [Call Stack](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#call-stack)
30 | - [Graphs](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#graphs)
31 | - [Tree traversal](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#tree-traversal-walking-the-tree)
32 | - [Credits](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_CONCEPTS.md#credits)
33 |
34 | ### Exercises
35 | - [Algorithms](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#algorithms)
36 | - [Arrays](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#arrays)
37 | - [Sorting](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#sorting)
38 | - [Binary trees](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#binary-trees)
39 | - [Graphs](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#graphs)
40 | - [Search](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#search)
41 | - [Optimization](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#optimization)
42 | - [Real Life problems](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#real-life-problems)
43 | - [Credits](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_EXERCISES.md#credits)
44 |
45 | ### Questions
46 | - [Key points](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_QUESTIONS.md#key-points)
47 | - [Strings](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_QUESTIONS.md#strings)
48 | - [Arrays](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_QUESTIONS.md#arrays)
49 | - [Binary Trees](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_QUESTIONS.md#binary-trees)
50 | - [Frontend](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_QUESTIONS.md#frontend)
51 | - [Backend](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CODING_QUESTIONS.md#backend)
52 |
53 | ### Platforms
54 | - [Codility Developer Training](https://app.codility.com/programmers/lessons/1-iterations/)
55 | - [Leetcode](https://leetcode.com/problemset/all)
56 | - [HackerRank](https://www.hackerrank.com/interview/interview-preparation-kit)
57 | - [CareerCup](https://www.careercup.com/page?pid=facebook-interview-questions)
58 | - [HiredInTech](https://www.hiredintech.com/)
59 | - [CodeChef](https://www.codechef.com/)
60 | - [Proyect Euler](https://projecteuler.net/index.php)
61 | - [GeeksforGeeks](https://www.geeksforgeeks.org/facebook-interview-preparation/)
62 | - [CodeForces](https://codeforces.com)
63 | - [Topcoder](https://www.topcoder.com)
64 | - [CodeChef](https://www.codechef.com)
65 |
66 | ## System Design Interview
67 | - [Design Exercises](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/DESIGN_EXERCISES.md#design-exercises)
68 | - [Amazon Dashboard](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/DESIGN_EXERCISES.md#amazon-dashboard)
69 | - [Facebook Fake Accounts](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/DESIGN_EXERCISES.md#facebook-fake-accounts)
70 | - [Credits](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/DESIGN_EXERCISES.md#credits)
71 |
72 | ## Cover Letter
73 | - [Cover Letter Template](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/COVER_LETTER.md#cover-letter)
74 | - [CV/Resume Template](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/COVER_LETTER.md#resumecv)
75 |
76 | ## Job Offers
77 | - [Accept a Job Offer - Email Template](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/JOB_OFFERS.md#accept-a-job-offer-email-template)
78 | - [Reject a Job Offer - Email Template](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/JOB_OFFERS.md#reject-a-job-offer-email-template)
79 |
80 | ## Job Career
81 | - [Introduce yourself](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/JOB_CAREER.md#introduce-yourself)
82 | - [Experience](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/JOB_CAREER.md#experience)
83 | - [Do you have Questions for us?](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/JOB_CAREER.md#questions-for-us)
84 |
85 | ## Salary Negotiation
86 | - [What is your current salary?](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/SALARY_NEGOTIATION.md#what-is-your-current-salary)
87 | - [What is your salary expectation?](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/SALARY_NEGOTIATION.md#what-is-your-salary-expectation)
88 | - [Benefits/Perks](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/SALARY_NEGOTIATION.md#benefitsperks)
89 | - [What are your hourly rate expectations?](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/SALARY_NEGOTIATION.md#what-are-your-hourly-rate-expectations)
90 | - [Promotions](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/SALARY_NEGOTIATION.md#promotions)
91 | - [How to Celebrate Success at Work: A Guide for Managers](https://www.leapsome.com/blog/how-to-celebrate-success-at-work)
92 | - [Credits](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/SALARY_NEGOTIATION.md#credits)
93 |
94 | ## Interviewing
95 | - [Doing an interview](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/INTERVIEWING.md#doing-an-interview)
96 | - [Instruments](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/INTERVIEWING.md#instruments)
97 | - [Essential](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/INTERVIEWING.md#essential)
98 | - [Introduction](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/INTERVIEWING.md#introduction)
99 | - [Phases](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/INTERVIEWING.md#phases)
100 | - [Credits](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/INTERVIEWING.md#credits)
101 |
102 | ## Mock Interviews
103 | - [Watch technical mock interviews with engineers from Google, Amazon, and more](https://interviewing.io/recordings)
104 | - [Practice live interviews with peers](https://www.pramp.com)
105 | - [The Interview Cake Course](https://www.interviewcake.com/table-of-contents)
106 | - [Get your coding skills certified, practice for technical interviews and build your developer resume](https://codesignal.com/developers)
107 |
108 | ## Career Path
109 | - [freeCodeCamp](https://www.freecodecamp.org/) (Guided bootcamp)
110 | - [Código Facilito](https://codigofacilito.com/) (Guided bootcamp)
111 | - [Platzi](https://platzi.com/) (Guided bootcamp & Learn English)
112 | - [Codecademy](https://www.codecademy.com/) (Build a career path)
113 | - [OSSU - Computer Science](https://github.com/ossu/computer-science) (Basic and Advanced concepts about Computer Science)
114 | - [Coursera](https://www.coursera.org/) (Build new skills)
115 | - [DevProjects by Codementor](https://www.codementor.io/projects) (Learn programming by building open source projects)
116 | - [Make It Real](https://makeitreal.camp/) (Optional & Get a Job)
117 |
118 | ### Career Advice
119 | - [Arc](https://arc.dev/get-featured?ref=fd-jdnichollsc) (Get a Remote Job)
120 | - 🇪🇸 🇨🇴 [Club de Algoritmia](https://discord.gg/AjExeyh) (Algorithms & Mock interviews)
121 | - [Career Growth Mentorships](https://www.notion.so/7e03d5ff94c94605a0f148a0e4c7502e?v=3e47d53cf0354755bdd3f6ea5886ab8b) (Adapt your career path through FREE mentoring)
122 | - [1:1 Questions](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/1_1_QUESTIONS.md) (One-on-One Meetings for career and professional development opportunities)
123 |
124 | ## JavaScript Language
125 | - [Learn JavaScript | MDN](https://developer.mozilla.org/en-US/Learn/JavaScript)
126 | - [A re-introduction to JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)
127 | - [The Modern JavaScript Tutorial](http://javascript.info)
128 | - [JavaScript Garden](http://bonsaiden.github.io/JavaScript-Garden)
129 | - [Eloquent JavaScript](https://eloquentjavascript.net)
130 | - [Understanding ES6](https://leanpub.com/understandinges6/read)
131 | - [Learning Advanced JavaScript](http://ejohn.org/apps/learn)
132 | - [5 Typical JavaScript Interview Exercises](https://www.sitepoint.com/5-typical-javascript-interview-exercises/)
133 | - [Airbnb JavaScript Style Guide() {](https://github.com/airbnb/javascript)
134 | - [JavaScript Questions](https://github.com/lydiahallie/javascript-questions)
135 | - [You Don't Know JS](https://github.com/getify/You-Dont-Know-JS)
136 | - [Functional-Light JavaScript](https://github.com/getify/Functional-Light-JS)
137 | - [Clean Code concepts adapted for JavaScript](https://github.com/ryanmcdermott/clean-code-javascript)
138 | - [70 JavaScript Interview Questions](https://dev.to/macmacky/70-javascript-interview-questions-5gfi)
139 | - [React Interview Questions](https://github.com/sudheerj/reactjs-interview-questions)
140 | - [Why did we build React?](https://reactjs.org/blog/2013/06/05/why-react.html)
141 |
142 | ## Resources
143 | - [Microsoft Interview tips](https://careers.microsoft.com/us/en/interviewtips)
144 | - [Cracking the Coding Interview](https://www.amazon.com/dp/0984782850/)
145 | - [Introduction to Algorithms](https://www.amazon.com/dp/0262033844)
146 | - [Algorithms in C](https://www.amazon.com/Algorithms-Parts-1-5-Bundle-Fundamentals/dp/0201756080)
147 | - [The Algorithm Design Manual](http://www.amazon.com/Algorithm-Design-Manual-Steve-Skiena/dp/0387948600)
148 | - [A Facebook developer shares 7 secrets to acing an engineering interview](https://www.businessinsider.com/how-to-prepare-for-facebook-engineering-interview-2016-3)
149 | - [To see some of the questions Facebook has asked: Glassdoor Interview Questions](https://www.glassdoor.com/Interview/Facebook-Software-Engineer-Interview-Questions-EI_IE40772.0,8_KO9,26.htm?sort.sortType=RD&sort.ascending=false)
150 | - [The Algorithm Design Canvas captures the thought process when solving an algorithmic problem. ](https://www.hiredintech.com/classrooms/algorithm-design/lesson/78)
151 | - [Gauge how prepared you are on CS fundamentals with more than 400 questions that will take from less than a minute to about an hour to solve.](https://www.interviewbit.com/)
152 | - [Preparing for Your Initial Interview at Facebook](https://www.facebook.com/careers/FEE-prep-initial)
153 | - [I interviewed at five top companies in Silicon Valley in five days, and luckily got five job offers](https://medium.com/@XiaohanZeng/i-interviewed-at-five-top-companies-in-silicon-valley-in-five-days-and-luckily-got-five-job-offers-25178cf74e0f)
154 | - [Software Architecture Books](https://github.com/mhadidg/software-architecture-books) - A comprehensive list of books on Software Architecture.
155 |
156 | ## Videos
157 | - [Jackson Gabbard’s Youtube channel](https://www.youtube.com/channel/UCcdCkJKXlRoXVD03eo-q8mQ)
158 | - [Recruiting process at Facebook](https://youtu.be/N233T0epWTs)
159 | - [How to Crush Your Coding Interview](https://www.facebook.com/Engineering/videos/10152735777427200/?v=10152735777427200)
160 | - [Careers OnAir Technical Interview Coding Demo](https://youtu.be/4NS51hRSaEE)
161 |
162 | ## Contributing ✨
163 | When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
164 | Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated** ❤️.
165 | You can learn more about how you can contribute to this project in the [contribution guide](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/CONTRIBUTING.md).
166 |
167 | ## License ⚖️
168 | This repository is available under the [MIT License](https://github.com/proyecto26/TheJobInterviewGuide/blob/main/LICENSE).
169 |
170 | ## Supporting 🍻
171 | I believe in Unicorns 🦄
172 | Support [me](http://www.paypal.me/jdnichollsc/2), if you do too.
173 |
174 | Donate **Ethereum**, **ADA**, **BNB**, **SHIBA**, **USDT/USDC**, **DOGE**, etc:
175 |
176 | > Wallet address: jdnichollsc.eth
177 |
178 | Please let us know your contributions! 🙏
179 |
180 | ## Happy coding 💯
181 | Made with ❤️
182 |
183 |
184 |
--------------------------------------------------------------------------------
/BEHAVIORAL_QUESTIONS.md:
--------------------------------------------------------------------------------
1 | # Behavioral Questions
2 |
3 | - How do you work with others?
4 | - How open are you to receiving feedback?
5 | - Tell me about a time where you made a mistake in a previous project/job.
6 | - Describe a situation where you had to complete a task/goal, and you could achieve it.
7 | - Give me an example of a time when you disagreed with a colleague.
8 | - Is there something you would like to ask?
9 | - What have you done in the last 3 jobs?
10 | - What is your experience working for startups?
11 | - What are your expectations in general for your new job?
12 | - Tell me about a time when you had to provide constructive feedback to a team member.
13 | - From the technical perspective:
14 | - How do you want to be managed?
15 | - Which challenges are you expecting to be facing here?
16 | - What are your 3 motivations to join this project?
17 |
18 |
19 | > Prepare sticky notes.
20 |
21 | ## Examples
22 |
23 |
24 | Describe a situation in which you were able to use persuasion to successfully convince someone to see things your way.
25 |
26 | - Creating a new template with ASP.NET MVC to work with designers in a better way (Separation of concerns for the win, instead of using server-side controls).
27 | - Use hybrid mobile frameworks (depending of the app) to reduce time to market and helping other teams (Become Ionic partners).
28 | - Creating new native plugins to give a better user experience (Open Source projects).
29 |
30 |
31 |
32 | Describe a time when you were faced with a stressful situation that demonstrated your coping skills.
33 |
34 | - Working until the next day for a release to production (BevyUp)
35 | - My cat walking on the balcony (During a demo with the client)
36 | - Situation: I was in a meeting with a client, presenting a demo, when suddenly my wife appeared very scared and asked me for help because something was happening, then I realized that my little cat was walking on the edge of the balcony, I had to pause my presentation because I was so worried.
37 | - Task: Ask for a break and rescue my cat.
38 | - Action: I had to be brave and rescue the cat, then I was able to finish the presentation.
39 | - Result: I was able to face that so stressful situation because I was thinking in the solution instead of the problem, and then I was calm because I had been able to finish the presentation with the help of my team.
40 | - A PoC with a new technology in a short period of time (StartUp Acquisition)
41 | - Working in a project with 1 week sprints (working weekends)
42 | - Excel generation tool migration with a class having more than 30k lines of code and without business formulas.
43 | - Situation: Code refactor of a software with more than 10 years in the market, and having classes of more than 30k lines of code, where the client did not know the formulas of the business with which more than 30 different critical excel files were exported.
44 | - Task: Looking to improve the UX (performance) for generating these files.
45 | - Action: I had to contribute to Open Source and created interfaces to simulate functionalities of a deprecated library. I spent some months working on this migration.
46 | - Result: Using benchmarks I was able to compare these tools, and I found some issues during this migration but with the help of these Open Source contributions (reporting issues, discussing and reviewing the code of the external lib) I was able to solve unforeseen problems.
47 |
48 |
49 |
50 | Give me a specific example of a time when you used good judgment and logic in solving a problem.
51 |
52 | - Creating a new Open Source project to improve UX with a native look & feel (React Native InAppBrowser).
53 | - Use memoization and Big O notation to reduce complexity with RxJS subscriptions.
54 | - Found SQL Injection issues concatenating Database queries from a third party system.
55 | - Using hooks to reduce code complexity and increase test coverage.
56 | - Using macros from Assembly lenguage to reduce complexity.
57 |
58 |
59 |
60 | Give me an example of a time when you set a goal and were able to meet or achieve it.
61 |
62 | - Using a new strategy to implement a real-time connection.
63 | - Database migration from NoSQL (MongoDB) to SQL & Multi-tenant (PostgreSQL) takes less than 3 months.
64 |
65 |
66 |
67 | Tell me about a time when you had to use your presentation skills to influence someone's opinion.
68 |
69 | - Comparison between React Native and NativeScript for cross-platform native UI apps.
70 | - Web Components and compilers instead of a Framework (Be agnostic, it Depends... maybe You don't need it).
71 | - Using promises for HTTP requests from Unity.
72 | - Divide and conquer (Avoid blocking tasks)
73 | - Situation: Implementing new features from a React Native app was giving us some problems, specially because we're using React class components with nested code, having complex local states with large components and repeated code, so it was difficult to maintain unit tests and increase test coverage.
74 | - Task: My goal was to help another Senior developer with a new feature adding a real-time connection from some screens of a chat module and increasing the test coverage of a complex component.
75 | - Action: We had some sessions of pair programming but I was stuck waiting for my partner to finish the dependent task assigned to him, so I decided to investigate on my own how to reduce the complexity of the current code and avoid adding nested code to the chat component. I learned about a new way to reuse code, extend behaviors easily and have components as small functions using functional programming and React hooks, while also implementing the real-time connection. As my colleague did not agree to do it in a different way, I proceeded to speak with the PM about the advantages that this new utility offered us and I made a presentation to share the knowledge gained about this new React feature with the rest of the team.
76 | - Result: We agreed with the team to use this new strategy for this implementation and thanks to this we were able to finish the feature 2 weeks ahead of schedule and increase test coverage by 20% by having small features that were much easier to maintain and test. Also, a few months later I made a talk about these topics for the rest of the company and it was shared on YouTube.
77 |
78 |
79 |
80 | Give me a specific example of a time when you had to conform to a policy with which you did not agree.
81 |
82 | - Using fingerprint to register arrival and departure time at work
83 |
84 |
85 |
86 | Please discuss an important written document you were required to complete.
87 |
88 | - Documenting multi-tenant architecture
89 | - Situation: Architecture documentation was required by the client.
90 | - Task: Create architecture documentation of the project about purpose, scope, business and technical architecture, data migration and deployment strategies, version management and environment set-up.
91 | - Action: I designed the first version of the document about architectural overview of the solution, to capture and convey the significant architectural decisions which have been made on the system.
92 | - Result: The documentation created was a good guide for new developers to understand the scope of the project, listing all definitions, references and human operations involved to support business processes which are triggered and generate business events. With this guide I defined each business process, design patterns and principles used in the project, coding conventions, describing frameworks, services and dependencies involved in the execution, defining the tiers where the software components are deployed and executed, listing functional and non-functional requirements and about technical architecture I generated component, deployment, package, use case and entity relationship diagrams to illustrate the logical structure and organization of the project. I identified opportunities for improvement about deployment strategies to automate the process publishing new releases to Production environment and avoiding risks to access to the database externally due to default configurations.
93 |
94 |
95 |
96 | Tell me about a time when you had to go above and beyond the call of duty in order to get a job done.
97 |
98 | - Use personal time to update deprecated templates and avoid code refactors of the project in the future.
99 | - Create a fully working prototype instead of a PoC to make a good impression with a partner.
100 | - Committed working in a PoC until early the next day.
101 | - Attending a meeting with the client while I was in a recreational activity of the company (playing bowling with coworkers).
102 | - Working in a presentation during weekends for all-hands meeting.
103 |
104 |
105 |
106 | Tell me about a time when you had too many things to do and you were required to prioritize your tasks.
107 |
108 | - Daily meetings to prioritize tasks.
109 | - Stoping/Delegating my tasks to help coworkers and other teams of the project (Releases to production, Hotfixes).
110 |
111 |
112 |
113 | Give me an example of a time when you had to make a split second decision.
114 |
115 | - Reverting deployment testing on production (CodePush not working with a hotfix to log native exceptions).
116 | - Stop a presentation with the client to rescue my cat while he was walking on the balcony outdoor.
117 |
118 |
119 |
120 | What is your typical way of dealing with conflict? Give me an example.
121 |
122 | - Take the decision with the rest of the team.
123 | - Analyze other perspectives, but review what we did and let's see what to do for improvement (Flexible).
124 | - Keep a cool head because it's just work (New PMs, coworkers getting frustration, etc).
125 |
126 |
127 |
128 |
129 | Tell me about a time you were able to successfully deal with another person even when that individual may not have personally liked you (or vice versa).
130 |
131 |
132 | - It's work, never mix business with personal matters (Loss of professionalism, maintain a balance between personal and professional lives).
133 | - PM taking bad decisions with the client, so taking decisions with the rest of the team and the software architect.
134 |
135 |
136 |
137 | Tell me about a difficult decision you've made in the last year.
138 |
139 | - Study for this interview, remember concepts that I'd not reviewed since college (Practice algorithms and many other things in a short time)
140 | - Situation: Many other professionals prepare months and even years to present themselves to a FAANG company, this is my first time and the recruiter contacted me because of my contributions, I was not prepared, It has really been a lot of work these days, preparing for these meetings, a lot to do in a short time.
141 | - Taking a remote job with only 4 months working as a Software Architect in another company
142 |
143 |
144 |
145 | Give me an example of a time when something you tried to accomplish and failed.
146 |
147 | - A big refactor took longer than estimated
148 |
149 |
150 |
151 | Give me an example of when you showed initiative and took the lead.
152 |
153 | - Help the company to be a trusted partner of a technology by sharing my own side projects
154 |
155 |
156 |
157 | Tell me about a recent situation in which you had to deal with a very upset customer or coworker.
158 |
159 | - Perfect is the enemy of good having strict deadlines (Done is better than perfect)
160 |
161 |
162 |
163 | Give me an example of a time when you motivated others.
164 |
165 | - Being speaker in local communities like CodeYourFuture
166 | - Helping another developer to get a new role (Being a mentor)
167 |
168 |
169 |
170 | Tell me about a time when you delegated a project effectively.
171 |
172 | - Delegating leadership while helping to develop her confidence **(nobody is indispensable, avoid comfort zones, upgrade her skills, adopt a proactive approach)**
173 |
174 |
175 |
176 | Give me an example of a time when you used your fact-finding skills to solve a problem.
177 |
178 | - Stranger things with the code (Strange behaviors, code not working as expected)
179 | - Creating templates and fixing issues learning new technologies with Open Source projects
180 |
181 |
182 |
183 | Tell me about a time when you missed an obvious solution to a problem.
184 |
185 | - Ignoring brute force solutions thinking about Big O Notation and Cyclomatic complexity
186 |
187 |
188 |
189 | Describe a time when you anticipated potential problems and developed preventive measures.
190 |
191 | - Sharing with the team about semantic versioning and the correct way to use that with CodePush from production
192 |
193 |
194 |
195 | Tell me about a time when you were forced to make an unpopular decision.
196 |
197 | - Not using Redux (Popular State management). I'll never know. I got the outcome I wanted, but I might have gotten a better result by handling it differently.
198 |
199 |
200 |
201 | Please tell me about a time you had to fire a friend.
202 |
203 | - Informed but they didn't take me into account
204 |
205 |
206 |
207 | Describe a time when you set your sights too high (or too low).
208 |
209 | - Being a perfectionist and trying to do everything on my own (not settling for what already exists and works, but trying to improve it)
210 |
211 |
212 |
213 | Let's say one of your peers on your team is underperforming. What would you do (if anything)?
214 |
215 | - Divide complex tasks and help my partner by having peer programming sessions to share knowledge or 1-1 meetings to discuss what I can do to help him/her improve in his/her career, I could help him/her with a mentoring process to define some **KPOs (Key Performance Objectives)** to continue growing and looking for him/her to take on new challenges in the project by delegating.
216 |
217 |
218 |
219 | What work have you found most technically challenging in your career and why?
220 |
221 |
222 |
223 | What work have you done that you were particularly proud of and why?
224 |
225 |
226 |
227 | When have you been happiest in your professional career and why?
228 |
229 |
230 |
231 | When have you been unhappiest in your professional career and why?
232 |
233 |
234 |
235 | ## Remember
236 | - Be yourself; mention where I have been wrong, I have failed **(Everyone makes mistakes)** and express the initiatives that I have taken.
237 | - Talk more about what I did, instead of talking so much about what we did as a team; e.g: I disccused with the manager, I shared a technical presentation with the team and together we managed to decide this. Talk with your team
238 | - There have been several situations where I failed, did I communicate it in time? it is important to mention it
239 | - Be honest, express if I made bad decisions, if it took me longer, and that I learned from the process.
240 | - How do you interact with the team?
241 | - How do I react to failure? Show what I learned from the experience to avoid repeating the same mistakes.
242 | - Give numbers, coverage improved, how much percentage? improved sales, how much? Did the decisions I made help make life easier for users?
243 | - Focused more about the product and business than technology, its important to ask yourself what are we doing? what is the goal of what we are building? to align the vision with the product team.
244 | - Show them you take responsibility for mistakes.
245 | - Keep it brief and concise. Try to tell the story in chronological order, too, without having to go back and forward in time repeatedly.
246 |
247 | ## Credits:
248 | - [Interview Questions and Answers by LinkedIn](https://www.linkedin.com/interview-prep)
249 | - [The STAR Method of Behavioral Interviewing](https://www.vawizard.org/wiz-pdf/STAR_Method_Interviews.pdf)
250 | - [@RamirezAlex](https://github.com/RamirezAlex)
251 |
--------------------------------------------------------------------------------
/CODING_EXERCISES.md:
--------------------------------------------------------------------------------
1 | ## Algorithms
2 | - Dijkstra (Shortest paths between nodes in a graph)
3 | - Rabin-Karp (a string-searching that uses hashing to find an exact match of a pattern string in a text)
4 | - Aho–Corasick (a string-searching that locates elements of a finite set of strings within an input text like "dictionary-matching")
5 |
6 | ## Arrays
7 |
8 | ### Given an array of size N in which every number is between 1 and N, determine if there are any duplicates
9 | ```ts
10 | // Time complexity: O(n^2) - BAD
11 | function hasDup (list: Array): boolean {
12 | for (let i = 0; i < list.length; i++) {
13 | for (let j = i+1; j < list.length; j++) {
14 | if (list[i] === list[j]) return true
15 | }
16 | }
17 | return false
18 | }
19 | // Time complexity: O(n) - GOOD
20 | function hasDup (list: Array): boolean {
21 | list.sort()
22 | for (let i = 0; i < list.length - 1; i++) {
23 | if (list[i] === list[i+1]) return true
24 | }
25 | return false
26 | }
27 | ```
28 |
29 | ### Given an array of words, get a list of these words bucket by anagrams
30 | ```sh
31 | Input: ["star", "rats", "car", "arc", "xml"]
32 | Output: [["star", "rats"], ["car", "arc"], ["xml"]]
33 | ```
34 | ```ts
35 | function getWordsBucketByAnagram(list: Array): Array> {
36 | const bucket: { [key: string]: Array } = {}
37 | for (let i = 0; i < list.length; i++) {
38 | const word = list[i]
39 | const key = word.split('').sort().join('')
40 | bucket[key] = [...(bucket[key] || []), word]
41 | }
42 | return Object.keys(bucket).map(key => bucket[key]) // Same as Object.values(bucket)
43 | }
44 | console.log(getWordsBucketByAnagram(["star", "rats", "car", "arc", "xml"]))
45 | ```
46 |
47 | ### Given a list of calendar events, determine if any events conflicts
48 | ```sh
49 | [
50 | [1, 2, 'a'], // start, end, id
51 | [3, 5, 'b'], -┐
52 | [4, 6, 'c'], -┘
53 | [7, 10, 'd'], -┐
54 | [8, 11, 'e'], |
55 | [10, 12, 'f'], -┘
56 | [13, 14, 'g']
57 | ];
58 | ```
59 | ```ts
60 | // SOLUTION 1: Brute force; Compare every event to every other event, Slow => O(n^2) complexity
61 | // SOLUTION 2: If the list is sorted, you can just compare the previous event, O(n) complexity
62 | function getConflicts (events: Array>) {
63 | return events.reduce(function (result, event, index) {
64 | const previousEvent = events[index-1]
65 | if (previousEvent && event[0] < previousEvent[1]) {
66 | result.push(event[2])
67 | }
68 | return result
69 | }, [])
70 | }
71 | // SOLUTION 3: Merge conflicts of the sorted list of events
72 | function findConflicts (events) {
73 | let conflicts = []
74 | let temp = [events[0][2]]
75 | let end = events[0][1]
76 | for (let i = 1; i < events.length; i++) {
77 | if (events[i][0] >= end) { // No conflict :)
78 | if (temp.length > 1) {
79 | conflicts = conflicts.concat(temp)
80 | }
81 | temp = []
82 | }
83 | end = Math.max(events[i][1], end)
84 | temp.push(events[i][2])
85 | }
86 | if (temp.length > 1) {
87 | conflicts = conflicts.concat(temp)
88 | }
89 | return conflicts
90 | }
91 | ```
92 |
93 | ### Given a table for N people, figure out every possible seating of the table for all of your friends
94 | ```sh
95 | # SOLUTION: Power set
96 | start
97 | leave | take
98 | |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|
99 | - 1
100 | |‾‾‾‾‾‾‾‾‾‾‾‾‾| |‾‾‾‾‾‾‾‾‾‾‾‾‾|
101 | -- -2 1- 12
102 | | | | |
103 | |‾‾‾‾‾| |‾‾‾‾‾| |‾‾‾‾‾| |‾‾‾‾‾|
104 | --- --3 -2- -23 1-- 1-3 12- 123
105 | | | |
106 | -234 1-34 12-4
107 | ```
108 | ```ts
109 | /**
110 | * Power set
111 | * Time complexity: O(2^n)
112 | */
113 | function findDinnerParties(friends: Array, tableSize: number) {
114 | function combineFriends(
115 | friends: Array,
116 | tableSize: number,
117 | groups: Array> = [],
118 | group: Array = [],
119 | pos = 0
120 | ) {
121 | if (group.length === tableSize) groups.push(group)
122 | else if (pos < friends.length) {
123 | combineFriends(friends, tableSize, groups, group, pos + 1)
124 |
125 | const newGroup = [...group]
126 | newGroup.push(friends[pos])
127 |
128 | combineFriends(friends, tableSize, groups, newGroup, pos + 1)
129 | }
130 | return groups
131 | }
132 |
133 | return combineFriends(friends, tableSize)
134 | }
135 | findDinnerParties(['Sara', 'Juan', 'Valentina', 'Julian', 'Laura'], 3)
136 | ```
137 |
138 | ## Sorting
139 |
140 | ### Merge Sort
141 | ```ts
142 | function mergeSort(arr: Array): Array {
143 | if(arr.length <= 1) return arr;
144 |
145 | const mid = Math.ceil(arr.length / 2);
146 | const left = mergeSort(arr.splice(0, mid));
147 | const right = mergeSort(arr.splice(-mid));
148 |
149 | const result = [];
150 | while(left.length && right.length){
151 | if(left[0] > right[0]) {
152 | result.push(right.shift());
153 | } else {
154 | result.push(left.shift());
155 | }
156 | }
157 | return [
158 | ...result,
159 | ...left,
160 | ...right
161 | ];
162 | }
163 | ```
164 |
165 | ### Quick Sort
166 | ```ts
167 | function quickSort(arr: Array): Array {
168 | if (arr.length < 2) {
169 | return arr;
170 | }
171 | const pivot = arr[Math.floor(Math.random() * arr.length)];
172 |
173 | const left = [];
174 | const right = [];
175 | const equal = [];
176 |
177 | for (let val of arr) {
178 | if (val < pivot) {
179 | left.push(val);
180 | } else if (val > pivot) {
181 | right.push(val);
182 | } else {
183 | equal.push(val);
184 | }
185 | }
186 | return [
187 | ...quickSort(left),
188 | ...equal,
189 | ...quickSort(right)
190 | ];
191 | }
192 | ```
193 |
194 | ## Binary trees
195 | ```ts
196 | class TreeNode {
197 | public left!: TreeNode
198 | public right!: TreeNode
199 | constructor (
200 | public value: number
201 | ) { }
202 | }
203 | ```
204 |
205 | ### Perform in order traversal on a binary tree
206 |
207 | ```ts
208 | function inOrder (node: TreeNode): Array {
209 | if (!node) return []
210 | return [
211 | ...inOrder(node.left),
212 | node.value,
213 | ...inOrder(node.right)
214 | ]
215 | }
216 | function addNode (node: TreeNode, value: number) {
217 | if(!node) return new TreeNode(value)
218 | if(value >= node.value) {
219 | node.right = addNode(node.right, value)
220 | } else {
221 | node.left = addNode(node.left, value)
222 | }
223 | return node
224 | }
225 | function setNodes (node: TreeNode, values: Array) {
226 | values.forEach(value => addNode(node, value))
227 | return node
228 | }
229 | const tree = new TreeNode(5)
230 | setNodes(tree, [8, 4, 3, 1])
231 | console.log(inOrder(tree)) // Output: [1, 3, 4, 5, 8]
232 | ```
233 |
234 | ### Given a binary tree, get the average value at each level of the tree
235 | ```sh
236 | Input:
237 | 4
238 | / \
239 | 7 9
240 | / \ \
241 | 10 2 6
242 | \
243 | 6
244 | /
245 | 2
246 | Output: [4, 8, 6, 6, 2]
247 | ```
248 | ```ts
249 | type Level = {
250 | total: number
251 | count: number
252 | }
253 |
254 | function collect (node: TreeNode, levels: Array, levelIndex = 0) {
255 | if(!node) return
256 | const level = levels[levelIndex]
257 | if (!level) {
258 | levels[levelIndex] = { total: node.value, count: 1 }
259 | } else {
260 | level.total += node.value
261 | level.count += 1
262 | }
263 | levelIndex++
264 | collect(node.left, levels, levelIndex)
265 | collect(node.right, levels, levelIndex)
266 | }
267 | function getAvgByLevel(node: TreeNode) {
268 | const levels: Array = []
269 | collect(node, levels)
270 | return levels.map(({ total, count }) => total / count)
271 | }
272 | const tree = new TreeNode(4);
273 | tree.left = new TreeNode(7);
274 | tree.left.left = new TreeNode(10);
275 | tree.left.right = new TreeNode(2);
276 | tree.left.right.right = new TreeNode(6);
277 | tree.left.right.right.left = new TreeNode(2);
278 | tree.right = new TreeNode(9);
279 | tree.right.right = new TreeNode(6);
280 | console.log(getAvgByLevel(tree))
281 | ```
282 |
283 | ## Graphs
284 | ```ts
285 | // Using Adjacency Matrix
286 | const graph =
287 | [[1, 1, 0, 0, 1, 0],
288 | [1, 0, 1, 0, 1, 0],
289 | [0, 1, 0, 1, 0, 0],
290 | [0, 0, 1, 0, 1, 1],
291 | [1, 1, 0, 1, 0, 0],
292 | [0, 0, 0, 1, 0, 0]];
293 | ```
294 |
295 | ### Returns whether there's a path between two nodes in a graph
296 | ```ts
297 | /**
298 | * DFS is easy to implement recursively because you can use the call stack as the stack.
299 | * Time complexity: O(|V|^2).
300 | */
301 | function hasPath(
302 | graph: Array>,
303 | current: number,
304 | goal: number
305 | ): boolean {
306 | const stack: Array = [];
307 | const visited: Array = [];
308 | stack.push(current);
309 | visited[current] = true;
310 | while (stack.length > 0) {
311 | const node = stack.pop();
312 | if (node === goal) {
313 | return true;
314 | }
315 | for (let i = 0; i < graph[node].length; i += 1) {
316 | if (graph[node][i] && !visited[i]) {
317 | stack.push(i);
318 | visited[i] = true;
319 | }
320 | }
321 | }
322 | return false;
323 | }
324 | console.log(hasPath(graph, 1, 5)) // Output: true
325 | ```
326 |
327 | ### Returns the shortest path between startNode and targetNode
328 | ```ts
329 | /**
330 | * BFS visits the neighbor vertices before visiting the child vertices, and a queue is used in the search process.
331 | * Time complexity: O(|V|^2).
332 | */
333 | function shortestPath (
334 | graph: Array>,
335 | startNode: number,
336 | targetNode: number
337 | ): Array | null {
338 | const parents = [];
339 | const queue = [];
340 | const visited = [];
341 | queue.push(startNode);
342 | parents[startNode] = null;
343 | visited[startNode] = true;
344 | while (queue.length > 0) {
345 | const current = queue.shift();
346 | if (current === targetNode) {
347 | return buildPath(parents, targetNode);
348 | }
349 | for (var i = 0; i < graph.length; i += 1) {
350 | if (i !== current && graph[current][i] && !visited[i]) {
351 | parents[i] = current;
352 | visited[i] = true;
353 | queue.push(i);
354 | }
355 | }
356 | }
357 | return null;
358 | }
359 | function buildPath (
360 | parents: Array,
361 | targetNode: number
362 | ): Array {
363 | const result = [targetNode];
364 | while (parents[targetNode]) {
365 | targetNode = parents[targetNode];
366 | result.push(targetNode);
367 | }
368 | return result.reverse();
369 | }
370 | console.log(shortestPath(graph, 1, 5)) // Output: [1, 2, 3, 5]
371 | ```
372 |
373 | ### Given a graph represented as an adjacency lists and a source vertex, get an array of objects describing each vertex with the distance from the source and the vertex's predecessor
374 | ```ts
375 | type Vertex = {
376 | distance: number,
377 | predecessor: number | null
378 | }
379 | function getVertexDistanceAndPredecessor (
380 | graph: Array>,
381 | source: number
382 | ): Array {
383 | const bfsInfo: Array = [];
384 | bfsInfo[source] = {
385 | distance: 0,
386 | predecessor: null
387 | };
388 | const queue: Array = [];
389 | queue.push(source);
390 |
391 | while (queue.length > 0) {
392 | const current = queue.shift() as number;
393 | for (let i = 0; i < graph[current].length; i++) {
394 | const v = graph[current][i];
395 | if (!bfsInfo[v]) {
396 | bfsInfo[v] = {
397 | predecessor: current,
398 | distance: bfsInfo[current].distance + 1
399 | };
400 | queue.push(v);
401 | }
402 | }
403 | }
404 | return bfsInfo;
405 | }
406 | ```
407 |
408 | ## Search
409 |
410 | ### Binary Search
411 | ```ts
412 | function binarySearch(arr: Array, goal: number): number {
413 | let low = arr[0]
414 | let high = arr[arr.length - 1]
415 | while (low < high) {
416 | const mid = Math.floor(low + (high-low)/2)
417 | if (arr[mid] > goal) {
418 | high = mid
419 | } else {
420 | low = mid + 1
421 | }
422 | }
423 | return high
424 | }
425 | ```
426 |
427 | ## Optimization
428 |
429 | ### Given a sorted array, insert a new element keeping the order
430 | ```ts
431 | function insertSorted(arr: Array, num: number) {
432 | let low = 0
433 | let high = arr.length
434 | while (low < high) {
435 | const mid = Math.floor(low + (high-low)/2)
436 | if (arr[mid] - num > 0) {
437 | high = mid
438 | } else {
439 | low = mid + 1
440 | }
441 | }
442 | return [
443 | ...arr.slice(0, low),
444 | num,
445 | ...arr.slice(low)
446 | ]
447 | }
448 | ```
449 |
450 | ## Real Life problems
451 |
452 | ### Duplicated Transactions
453 | Sometimes when a customer is charged, there is a duplicate transaction created. We need to find those transactions so that they can be dealt with. Everything about the transaction should be identical, except the transaction id and the time at which it occurred, as there can be up to a minute delay.
454 |
455 | A transaction is looks like:
456 | ```json
457 | {
458 | "id": 123,
459 | "sourceAccount": "my_account",
460 | "targetAccount": "coffee_shop",
461 | "amount": -30,
462 | "category": "eating_out",
463 | "time": "2018-03-12T12:34:00Z"
464 | }
465 | ```
466 |
467 | ```js
468 | // Input: list of transactions (Transaction[])
469 | findDuplicateTransactions(transactions)
470 | // Output: list of all the duplicate transaction groups, ordered by time ascending (Transaction[][])
471 | ```
472 |
473 | Find all transactions that have the same sourceAccount, targetAccount, category, amount, and the time difference between each consecutive transaction is less than 1 minute.
474 | ```js
475 | Array.prototype.flatMap = function(lambda) {
476 | return [].concat.apply([], this.map(lambda))
477 | }
478 | function diffMinutes(dt2, dt1)
479 | {
480 | const diff = (dt2.getTime() - dt1.getTime()) / 1000 / 60
481 | return Math.abs(diff)
482 | }
483 | // Sort with FP (Inmutability, Pure function)
484 | function sortFP (
485 | transactions,
486 | timeProp = 'time'
487 | ) {
488 | return [...transactions].sort(
489 | (a, b) => new Date(a[timeProp]) - new Date(b[timeProp])
490 | )
491 | }
492 |
493 | // return your result from this function
494 | function findDuplicateTransactions (transactions = []) {
495 | transactions = sortFP(transactions)
496 | /**
497 | * key: sourceAccount__targetAccount__category__amount
498 | * groups: Array