Giter Club home page Giter Club logo

cracking-the-coding-interview-typescript's Introduction

CtCI-TS

Cracking the Coding Interview - TypeScript CircleCI

Cracking the Coding Interview 6th Ed. TypeScript Solutions.


Table of Contents ๐Ÿ“š

Instructions ๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป

  • This repository contains TypeScript attempts on questions listed in the book.

  • Under the directory for each question, you will find:

    • an index.test.ts containing unit-tests;
    • an index.ts containing devised solution(s).
  • As a standard, we use gitmoji for all commit messages. โœจ

List of Coding Questions ๐Ÿ—‚

Chapter 1 Chapter 2 Chapter 3
โœ… 1.1 - Is Unique โœ… 2.1 - Remove Dups โœ… 3.1 - Three in One
โœ… 1.2 - Check Permutation โœ… 2.2 - Return Kth to Last โœ… 3.2 - Stack Min
โœ… 1.3 - URLify โœ… 2.3 - Delete Middle Node โœ… 3.3 - Stack of Plates
โœ… 1.4 - Palindrome Permutation โœ… 2.4 - Partition โœ… 3.4 - Queue via Stacks
โœ… 1.5 - One Away โœ… 2.5 - Sum Lists โœ… 3.5 - Sort Stack
โœ… 1.6 - String Compression โœ… 2.6 - Palindrome โœ… 3.6 - Animal Shelter
โœ… 1.7 - Rotate Matrix โœ… 2.7 - Intersection
โœ… 1.8 - Zero Matrix โœ… 2.8 - Loop Detection
โœ… 1.9 - String Rotation
Chapter 4 Chapter 5 Chapter 6
โœ… 4.1 - Route Between Nodes โœ… 5.1 - Insertion โ˜‘๏ธ 6.1 - Heavy Pill
โœ… 4.2 - Minimal Tree โœ… 5.2 - Binary to String ๏ธ๏ธ๏ธ๏ธ๏ธโ˜‘๏ธ 6.2 - Basketball
โœ… 4.3 - List of Depths โœ… 5.3 - Flip Bit To Win โ˜‘๏ธ 6.3 - Dominos
โœ… 4.4 - Check Balanced โœ… 5.4 - Next Number โ˜‘๏ธ 6.4 - Ants on a Triangle
โœ… 4.5 - Validate BST โœ… 5.5 - Debugger โ˜‘๏ธ 6.5 - Jugs of Water
โœ… 4.6 - Successor โœ… 5.6 - Conversion โ˜‘๏ธ 6.6 - Blue-Eyed Island
โœ… 4.7 - Build Order โœ… 5.7 - Pairwise Swap โ˜‘๏ธ 6.7 - The Apocalypse
โœ… 4.8 - First Common Ancestor โœ… 5.8 - Draw Line โ˜‘๏ธ 6.8 - The Egg Drop Problem
โœ… 4.9 - BST Sequences โ˜‘๏ธ 6.9 - 100 Lockers
โœ… 4.10 - Check Subtree โ˜‘๏ธ 6.10 - Poison
โœ… 4.11 - Random Node
โœ… 4.12 - Paths with Sum
Chapter 7 Chapter 8 Chapter 9
โœ… 7.1 - Deck of Cards โœ… 8.1 - Triple Step โŒ 9.1 - Stock Data
โœ… 7.2 - Call Center โœ… 8.2 - Robot in a Grid โŒ 9.2 - Social Network
โœ… 7.3 - Jukebox โœ… 8.3 - Magic Index โŒ 9.3 - Web Crawler
โœ… 7.4 - Parking Lot โœ… 8.4 - Power Set โŒ 9.4 - Duplicate URLs
โŒ 7.5 - Online Book Reader โœ… 8.5 - Recursive Multiply โŒ 9.5 - Cache
โŒ 7.6 - Jigsaw โœ… 8.6 - Towers of Hanoi โŒ 9.6 - Sales Rank
โŒ 7.7 - Chat Server โœ… 8.7 - Permutations without Dups โŒ 9.7 - Personal Financial Manager
โŒ 7.8 - Othello โœ… 8.8 - Permutations with Dups โŒ 9.8 - Paste Bin
โŒ 7.9 - Circular Array โœ… 8.9 - Parens
โŒ 7.10 - Minesweeper โœ… 8.10 - Paint Fill
โŒ 7.11 - File System โœ… 8.11 - Coins
โŒ 7.12 - Hash Table โœ… 8.12 - Eight Queens
โŒ 7.11 - File System โœ… 8.13 - Stack Boxes
โŒ 7.12 - Hash Table โœ… 8.14 - Boolean Evaluation
Chapter 10
โŒ 10.1 - Sorted Merge
โŒ 10.2 - Group Anagrams
โŒ 10.3 - Search In Rotated Array
โŒ 10.4 - Sorted Search No Size
โŒ 10.5 - Sparse Search
โŒ 10.6 - Sort Big File
โŒ 10.7 - Missing Int
โŒ 10.8 - Find Duplicates
โŒ 10.9 - Sorted Matrix Search
โŒ 10.10 - Rank From Stream
โŒ 10.11 - Peaks And Valleys

cracking-the-coding-interview-typescript's People

Contributors

braden1996 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cracking-the-coding-interview-typescript's Issues

Why is position of rightmost non-trailing zero equal to c0 + c1?

Came across your repo as I was solving the cracking the coding interview questions. I'm very puzzled by solutions to Chapter 5, question 5. The question is titled Titled Next Number.

Do you happen to understand why position is equal to c0 + c1.

Just as an example from the book:
Binary representation of number 13948 is: 11011001111100
c0 is: 5
c1: 9

whereas the rightmost non leading 0 should be position index 7. Whereas your solution as well as the book solution suggests it is c0+c1 = 14. Which seems incorrect.

Do you have any insight as to why that might be the case?

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.