Git Product home page Git Product logo

patterns's Introduction

description coverY
Don't leave your interviews to chance
0

Introduction

What is this book?

Methodology

To solve a Rubik's cube, you recognize patterns and apply specific combinations of moves (algorithms) until the cube is solved. An example of an algorithm is for solving the yellow face when the pieces are in the pattern shown below.

Rubik's Cube OLL T Algorithm

This algorithm consists of two parts:

  • Setup: position the cube in a way to apply the sub-algorithm.
  • Sub-algorithm: apply a set of moves to reorient pieces.

Once you memorize a few patterns/algorithms, you are able to restructure them together to solve any possible position on the cube. You even start to recognize new patterns and form algorithms intuitively.

A large majority of programming problems consist of applying specific algorithms to data structure access-patterns. Once we break down problems into sub-problems, they just become a combination of patterns/algorithms to achieve the solved state.

This book aims to provide programming problem mastery through strengthening pattern recognition and algorithm application.

Format

I dedicate a chapter to each pattern where I:

  • Introduce the pattern
    • Walkthrough simple example problem
  • Explain variations
    • Walkthrough examples for variations
  • Walkthrough harder problems
  • Provide further resources and challenge problems

The problems will come from programming problem sites (like LeetCode, Project Euler, and Kattis) and my personal interview experiences. I'll also touch on some behavioral and resume advice briefly.

All provided code/solutions are written in Python but the strategies presented are language-agnostic.

Alternatives

If you're looking for more information on interview processes, check out the Tech Interview Handbook.

If you're looking for curated lists of problems by patterns, check out LeetCode Patterns.

A great, pattern-oriented course is Grokking the Coding Interview but it will cost you $15/month.

Who is this for?

tl;dr: You've solved, or are able to solve, Two Sum on LeetCode.

I expect you have familiarity with general algorithms and have taken the equivalent of a data structures and algorithms course. This book is not introductory in nature--the goal is to make hard problems feel approachable during interviews.

Who wrote this?

Hayden Daly did. I am a grad student at Cornell Tech and I've interned at companies including Stripe, Expo, and Disney. I aim to use writing this as a tool to improve my interview and technical writing skills.

patterns's People

Contributors

gitbook-bot avatar haydendaly avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.