coding-interview-university/translations/README-ptbr.md

145 KiB
Raw Blame History

Universidade de Entrevista da Google

Original: Inglês

O que é isso?

Esse é o meu plano de estudo mensal para ir de desenvolvedor web (autodidata, sem formação em Ciência da Computação) à engenheiro de software da Google.

Programando no quadro branco - do Vale do Silício da HBO

Essa longa lista foi extraída e expandida a partir das anotações de treinamento da Google, então essas são as coisas que você precisa saber. Eu adicionei alguns itens extras no final que podem aparecer na entrevista ou serem úteis para resolver um problema. Muitos itens são da obra “Get that job at Google” (Consiga aquele trabalho na Google) de Steve Yegges e às vezes são expressados palavra-por-palavra nas anotações de treinamento da Google.

Eu resumi o que você precisa saber das recomendações do Yegge. Eu alterei os requerimentos do Yegge com base em informações que recebi do meu contato na Google. Isso é direcionado à engenheiros de software novos ou àqueles que estão trocando de desenvolvimento de software/web para engenharia de software (onde conhecimento de ciência de computação é necessário). Se você tem vários anos de experiência e está alegando muitos anos de experiência com engenharia de software, pode esperar por uma entrevista mais difícil. Leia mais

Se você tem vários anos de experiência com desenvolvimento de software/web, observe que a Google considera engenharia de software algo distinto de desenvolvimento de software/web e eles pedem conhecimento de ciência da computação.

Se você quer ser um engenheiro de confiabilidade ou engenheiro de sistemas, estude mais da lista opcional (rede, segurança).


Table of Contents

---------------- Tudo abaixo é opcional ----------------


Por que usar?

Estou seguindo esse plano para me preparar para a minha entrevista com a Google. Eu estive construindo a web, construindo serviços, e lançando startups desde 1997. Eu sou graduado em economia, não em ciência da computação. Eu tenho sido muito bem sucedido em minha carreira, mas eu quero trabalhar na Google. Quero progredir para sistemas maiores e realmente entender sistemas de computação, eficiência algorítmica, desempenho de estrutura de dados, linguagens de baixo nível, e como tudo funciona. E se você não sabe nada disso, a Google não vai te contratar.

Quando eu comecei esse projeto, I didn't know a stack from a heap, didn't know Big-O anything, nada sobre árvores, or how to traverse a graph. Se eu tivesse que escrever um algoritmo de ordenação, eu posso te dizer que ele não seria muito bom. Todas as estruturas de dados que eu já usei eram construídas dentro da linguagem, e eu não sabia como elas funcionavam por baixo dos panos. Eu nunca tive que gerenciar memória a não ser que um processo que eu estava rodando desse um erro de "memória insuficiente", nesse caso eu teria que dar um jeito. Eu já usei alguns arrays multidimensionais na minha vida e milhares de arrays associativos, mas eu nunca criei estruturas de dados do zero.

Mas depois de passar por esse plano de estudo sou confiante de que serei contratado. É um longo plano. Vai levar meses. Se você já é familiarizado com muitas dessas coisas, você vai precisar de muito menos tempo.

Como usar

Tudo abaixo é um esboço, e você deve abordar os itens em ordem de cima para baixo.

Eu estou usando a sintaxe de markdown especial do Github, incluindo listas de tarefas para verificar o progresso.

Crie um novo branch para você verificar itens assim, apenas coloque um x entre os colchetes: [x]

Bifurque (fork) um branch e siga os comandos abaixo

git checkout -b progress

git remote add jwasham https://github.com/jwasham/google-interview-university

git fetch --all

Marque todas as caixas com X depois que você completar suas alterações

git add .

git commit -m "Marked x"

git rebase jwasham/master

git push --force

Mais sobre a sintaxe de markdown especial do Github

Entre no Clima de um Googler

Imprima um cartaz (ou dois) de "future Googler" e mantenha seus olhos no prêmio.

cartaz de um futuro Googler

Eu consegui o trabalho?

Estou na fila no momento. Espero ser entrevistado logo.

Obrigado pela referência, JP.

Me acompanhe

Minha estória: Por que eu estudei em tempo integral por 8 meses para uma entrevista com a Google

Estou na jornada, também. Me acompanhe:

John Washam - Universidade de Entrevista da Google

Não ache que você não é inteligente o suficiente

Sobre a Google

Sobre os recursos em vídeo

Alguns vídeos estão disponíveis somente ao ingressar em um curso no Coursera, EdX, ou Lynda.com. Esses são chamados de MOOCs (Curso Online Aberto e Massivo). Às vezes as aulas não estão em sessão, nesse caso você terá que esperar alguns meses, portanto não terá acesso até lá. Os cursos da Lynda.com não são gratuitos.

Eu agradeceria a ajuda de vocês em adicionar fontes públicas gratuitas e sempre disponíveis, como vídeos do YouTube para acompanhar os vídeos de curso online.
Eu gosto de usar palestras de universidades;

Processo de Entrevista e Preparação Geral para a Entrevista

Escolha Uma Linguagem para a Entrevista

Eu escrevi esse pequeno artigo sobre isso: Important: Pick One Language for the Google Interview (Importante: Escolha Uma Linguage para a Entrevista da Google)

Você pode escolher uma linguagem com a qual você esteja confortável para fazer a parte de programar (parte prática) da entrevista, mas para a Google, essas são ótimas opções:

  • C++
  • Java
  • Python

You could also use these, but read around first. There may be caveats:

  • JavaScript
  • Ruby

You need to be very comfortable in the language and be knowledgeable[1]. [1]translator note > clarify with author: "knowledgeable about the chosen language or knowledgeable in general? (about programming in general)

Leia mais sobre as escolhas:

Veja recursos de linguagens aqui

Você vai ver aprendizado de C, C++ e Python incluído abaixo, porque eu estou aprendendo. Tem alguns livros envolvidos, veja no final.

Lista de Livros

This is a shorter list than what I used. This is abbreviated to save you time.

Preparação para a Entrevista

Se você tem muito tempo sobrando:

  • Elements of Programming Interviews
    • todo código em C++, muito bom se você está pensando em usar C++ na sua entrevista
    • um bom livro sobre resolução de problemas em geral.

Arquitetura de Computador

Se estiver com pouco tempo:

  • Write Great Code: Volume 1: Understanding the Machine
    • O livro foi publicado em 2004, e está meio vencido, mas é um recurso maravilhoso para compreender um computador resumidamente.
    • The author invented HLA, so take mentions and examples in HLA with a grain of salt. Not widely used, but decent examples of what assembly looks like.
    • These chapters are worth the read to give you a nice foundation:
      • Chapter 2 - Numeric Representation (Capítulo 2 - Representação Numérica)
      • Chapter 3 - Binary Arithmetic and Bit Operations
      • Chapter 4 - Floating-Point Representation
      • Chapter 5 - Character Representation
      • Chapter 6 - Memory Organization and Access
      • Chapter 7 - Composite Data Types and Memory Objects
      • Chapter 9 - CPU Architecture
      • Chapter 10 - Instruction Set Architecture
      • Chapter 11 - Memory Architecture and Organization

Se você tem mais tempo (eu quero esse livro):

Específico de Linguagem

Você precisa escolher uma linguagem para a entrevista (veja acima). Aqui estão minhas recomendações por linguagem. Eu não conheço recursos para todas as linguagens. Contribuições de recursos aqui são bem-vindas.

If you read though one of these, you should have all the data structures and algorithms knowledge you'll need to start doing coding problems. You can skip all the vídeo lectures in this project, unless you'd like a review.

Additional language-specific resources here.

C++

I haven't read these two, but they are highly rated and written by Sedgewick. He's awesome.

If you have a better recommendation for C++, please let me know. Looking for a comprehensive resource.

Java

OR:

  • Data Structures and Algorithms in Java
    • by Goodrich, Tamassia, Goldwasser
    • used as optional text for CS intro course at UC Berkeley
    • see my book report on the Python version below. This livro covers the same topics.

Python

Livros Opcionais

Some people recommend these, but I think it's going overboard, unless you have many years of software engineering experience and expect a much harder interview:

  • Algorithm Design Manual (Skiena)

    • As a review and problem recognition
    • The algorithm catalog portion is well beyond the scope of difficulty you'll get in an interview.
    • This livro has 2 parts:
      • class textbook on data structures and algorithms
        • pros:
          • is a good review as any algorithms textbook would be
          • nice stories from his experiences solving problems in industry and academia
          • code examples in C
        • cons:
          • can be as dense or impenetrable as CLRS, and in some cases, CLRS may be a better alternative for some subjects
          • chapters 7, 8, 9 can be painful to try to follow, as some items are not explained well or require more brain than I have
          • don't get me wrong: I like Skiena, his teaching style, and mannerisms, but I may not be Stony Brook material.
      • algorithm catalog:
        • this is the real reason you buy this livro.
        • about to get to this part. Will update here once I've made my way through it.
    • To quote Yegge: "More than any other livro it helped me understand just how astonishingly commonplace (and important) graph problems are they should be part of every working programmer's toolkit. The livro also covers basic data structures and sorting algorithms, which is a nice bonus. But the gold mine is the second half of the livro, which is a sort of encyclopedia of 1-pagers on zillions of useful problems and various ways to solve them, without too much detail. Almost every 1-pager has a simple picture, making it easy to remember. This is a great way to learn how to identify hundreds of problem types."
    • Can rent it on kindle
    • Half.com is a great resource for textbooks at good prices.
    • Answers:
    • Errata
  • Introduction to Algorithms

    • Important: Reading this livro will only have limited value. This livro is a great review of algorithms and data structures, but won't teach you how to write good code. You have to be able to code a decent solution efficiently.
    • To quote Yegge: "But if you want to come into your interviews prepped, then consider deferring your application until you've made your way through that livro."
    • Half.com is a great resource for textbooks at good prices.
    • aka CLR, sometimes CLRS, because Stein was late to the game
  • Programming Pearls

    • The first couple of chapters present clever solutions to programming problems (some very old using data tape) but that is just an intro. This a guidebook on program design and architecture, much like Code Complete, but much shorter.
  • "Algorithms and Programming: Problems and Solutions" by Shen

    • A fine livro, but after working through problems on several pages I got frustrated with the Pascal, do while loops, 1-indexed arrays, and unclear post-condition satisfaction results.
    • Would rather spend time on coding problems from another livro or online coding problems.

Antes de começar

Essa lista cresceu por longos meses, e sim, ela meio que saiu do controle.

Aqui estão alguns erros que eu cometi para que você tenha uma melhor experiência.

1. Você não se lembrará disso tudo

Assisti a horas de vídeos e fiz anotações e meses depois havia muito que eu não me lembrava. Eu passei 3 dias revisando minhas anotaçes e fazendo flashcards para que eu pudesse relembrar.

Por favor, leia para que você não cometa os meus erros:

Retaining Computer Science Knowledge

2. Use Flashcards

Para solucionar o problema, eu fiz um pequeno site de flashcards onde eu poderia adicionar dois tipos de flashcards: genérico e código.
Cada cartão tem formatação diferente.

Eu fiz um website focado em mobile para que eu pudesse rever no meu celular, tablet, onde quer que eu esteja.

Faça o seu próprio grátis:

Pensando bem, eu fiz uma revisão e tive os cartões completos, abrangendo desde linguagem assembly e trivialidades de Python até aprendizado de máquina e estatísticas. É demais para o que é exigido pelo Google. 

Nota: A primeira vez que você reconhece que sabe a resposta, não a marque como conhecida. Você tem que ver o mesmo cartão e respondê-lo várias vezes corretamente antes de realmente conhecê-lo. A repetição colocará esse conhecimento mais aprodundado em seu cérebro.

Uma alternativa ao uso do meu site de flashcards é Anki, que me foi recomendado várias vezes. Ele usa um sistema de repetição para ajuda-lo a se lembrar. É fácil de usar, está disponível em todas as plataformas e possui um sistema de sincronização em nuvem. Ele custa 25 dólares no iOS, mas é gratuito em outras plataformas.

Meu banco de dados de flashcards em formato Anki: https://ankiweb.net/shared/info/25173560 (obrigado @xiewenya)

3. Reveja, Reveja e Reveja

Eu mantenho um conjunto de anotações em ASCII, OSI stack, Big-O notations, e muito mais. Eu os estudo quando tenho algum tempo livre.

Faça uma pausa dos problemas de programação por meia hora e passe por seus flashcards.

4. Foco

Há um monte de distrações que podem ocupar um tempo valioso. Foco e concentração são difíceis.

O que você não verá

Essa grande lista começou como uma "to-do list" pessoal feita a partir de anotações do treinamento de entrevistas da Google. Essas são tecnologias predominantes, mas que não foram mencionadas nessas anotações:

  • SQL
  • Javascript
  • HTML, CSS, e outras tecnologias de front-end

The Daily Plan

Some subjects take one day, and some will take multiple days. Some are just learning with nothing to implement.

Each day I take one subject from the list below, watch vídeos about that subject, and write an implementation in:

  • C - using structs and functions that take a struct * and something else as args.
  • C++ - without using built-in types
  • C++ - using built-in types, like STL's std::list for a linked list
  • Python - using built-in types (to keep practicing Python)
  • and write tests to ensure I'm doing it right, sometimes just using simple assert() statements
  • You may do Java or something else, this is just my thing.

You don't need all these. You need only one language for the interview.

Why code in all of these?

  • Practice, practice, practice, until I'm sick of it, and can do it with no problem (some have many edge cases and bookkeeping details to remember)
  • Work within the raw constraints (allocating/freeing memory without help of garbage collection (except Python))
  • Make use of built-in types so I have experience using the built-in tools for real-world use (not going to write my own linked list implementation in production)

I may not have time to do all of these for every subject, but I'll try.

You can see my code here:

You don't need to memorize the guts of every algorithm.

Write code on a whiteboard or paper, not a computer. Test with some sample inputs. Then test it out on a computer.

Prerequisite Knowledge

Algorithmic complexity / Big-O / Asymptotic analysis

Data Structures

More Knowledge

Trees

Sorting

If you need more detail on this subject, see "Sorting" section in Additional Detail on Some Subjects

Graphs

Graphs can be used to represent many problems in computer science, so this section is long, like trees and sorting were.

You'll get more graph practice in Skiena's livro (see livros section below) and the interview livros

Even More Knowledge


System Design, Scalability, Data Handling


Final Review

Essa seção terá vídeos mais curtos que você pode assistir rapidamente para revisar a maioria dos conceitos importantes.
É legal se você quiser dar uma refrescada na memória.

Coding Question Practice

Now that you know all the computer science topics above, it's time to practice answering coding problems.

Coding question practice is not about memorizing answers to programming problems.

Why you need to practice doing programming problems:

  • problem recognition, and where the right data structures and algorithms fit in
  • gathering requirements for the problem
  • talking your way through the problem like you will in the interview
  • coding on a whiteboard or paper, not a computer
  • coming up with time and space complexity for your solutions
  • testing your solutions

There is a great intro for methodical, communicative problem solving in an interview. You'll get this from the programming interview livros, too, but I found this outstanding: Algorithm design canvas

My Process for Coding Interview (Book) Exercises

No whiteboard at home? That makes sense. I'm a weirdo and have a big whiteboard. Instead of a whiteboard, pick up a large drawing pad from an art store. You can sit on the couch and practice. This is my "sofa whiteboard". I added the pen in the photo for scale. If you use a pen, you'll wish you could erase. Gets messy quick.

my sofa whiteboard

Supplemental:

Read and Do Programming Problems (in this order):

See Book List above

Coding exercises/challenges

Once you've learned your brains out, put those brains to work. Take coding challenges every day, as many as you can.

Challenge sites:

Maybe:

Once you're closer to the interview

Your Resume

Be thinking of for when the interview comes

Think of about 20 interview questions you'll get, along with the lines of the items below. Have 2-3 answers for each. Have a story, not just data, about something you accomplished.

  • Why do you want this job?
  • What's a tough problem you've solved?
  • Biggest challenges faced?
  • Best/worst designs seen?
  • Ideas for improving an existing Google product.
  • How do you work best, as an individual and as part of a team?
  • Which of your skills or experiences would be assets in the role and why?
  • What did you most enjoy at [job x / project y]?
  • What was the biggest challenge you faced at [job x / project y]?
  • What was the hardest bug you faced at [job x / project y]?
  • What did you learn at [job x / project y]?
  • What would you have done better at [job x / project y]?

Have questions for the interviewer

Some of mine (I already may know answer to but want their opinion or team perspective):
  • How large is your team?
  • What does your dev cycle look like? Do you do waterfall/sprints/agile?
  • Are rushes to deadlines common? Or is there flexibility?
  • How are decisions made in your team?
  • How many meetings do you have per week?
  • Do you feel your work environment helps you concentrate?
  • What are you working on?
  • What do you like about it?
  • What is the work life like?

Once You've Got The Job

Congratulations!

Keep learning.

You're never really done.


*****************************************************************************************************
*****************************************************************************************************

Everything below this point is optional. These are my recommendations, not Google's.
By studying these, you'll get greater exposure to more CS concepts, and will be better prepared for
any software engineering job. You'll be a much more well-rounded software engineer.

*****************************************************************************************************
*****************************************************************************************************

Livros Adicionais

Additional Learning

--

Additional Detail on Some Subjects

I added these to reinforce some ideas already presented above, but didn't want to include them
above because it's just too much. It's easy to overdo it on a subject.
You want to get hired in this century, right?

Séries de Vídeo

Sit back and enjoy. "Netflix and skill" :P

Computer Science Courses