braden1996 / cracking-the-coding-interview-typescript Goto Github PK
View Code? Open in Web Editor NEWCracking the Coding Interview 6th Ed. TypeScript Solutions
Cracking the Coding Interview 6th Ed. TypeScript Solutions
These exercises were completed using the (now deprecated) AdjacencyList util
Would be nice to write unit-tests validating that these data-structures (and they're given methods) work as expected.
Calculate length of longest branch and check that it is less than Math.floor(totalNumberOfNodes)
.
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?
Currently, there are no checks in place to verify that the Node is actually part of a tree. This means, this function may recurse forever (until crash).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.