Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 1.62 KB

File metadata and controls

56 lines (45 loc) · 1.62 KB

Elements-of-Programming-Interviews-JavaScript

Elements of Programming Interviews JavaScript Solutions

Instructions

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

  • Contributions welcome

List of Coding Questions:

Chapter 4 - Primitive Types

  • 4.1 - Computing the parity of a word
  • 4.2 - Swap bits
  • 4.3 - Reverse bits
  • 4.4 - Find a closest integer with the same weight
  • 4.5 - Compute X * Y without arithmetical operators
  • 4.6 - Compute X / Y
  • 4.7 - Compute X ^ Y
  • 4.8 - Reverse digits
  • 4.9 - Check if a decimal integer is a palindrome
  • 4.10 - Generate uniform random numbers
  • 4.11 - Rectangle intersection

Chapter 2 - Arrays

  • 5.1 - The Dutch national flag problem
  • 5.2 - Increment an arbitrary-precision integer
  • 5.3 - Multiply two arbitrary-precision integers
  • 5.4 - Advancing through an array
  • 5.5 - Deleting duplicates from a sorted array
  • 5.6 - Buy and sell a stock once
  • 5.7 - Buy and sell a stock twice
  • 5.8 - Computing an alternation
  • 5.9 - Enumerate all primes to n
  • 5.10 - Permute the elements of an array
  • 5.11 - Compute the next permutation
  • 5.12 - Sample offline data
  • 5.13 - Sample offline data II
  • 5.14 - Compute a random permutation
  • 5.15 - Compute a random subset
  • 5.16 - Generate nonuniform random numbers
  • 5.17 - The Sudoku checker problem
  • 5.18 - Compute the spiral ordering of a 2D array
  • 5.19 - Rotate a 2D array
  • 5.20 - Compute rows in Pascal's Triangle

More Chapters coming soon...


Test

npm test