ctci-chambers

2.2.0 • Public • Published

npm version

ctci-chambers

A Typescript implementation of the solutions to Cracking the Coding Interview by Gayle McDowell.

Setup

Install

npm install ctci-chambers

Usage

Import the entire package:

import * as ctci from 'ctci-chambers';

ctci.isPalindromePermutation('race car'); // true
ctci.isPalindromePermutation('nope');     // false

or, import only the desired functions:

import { isPalindromePermutation } from 'ctci-chambers';

isPalindromePermutation('race car'); // true
isPalindromePermutation('nope');     // false

API Overview

  • Chapter 1: Arrays and Strings:
    • isUnique
    • isPermutation
    • urlify
    • isPalindromePermutation

Test

Tests are written using Jest. Install the project dependencies first, then run the tests.

npm install
npm test

Why?

I had two goals in mind:

  1. Deploy a package to npm.
  2. Solve all the questions in Cracking the Coding Interview.

It was a way to also practice semantic versioning, documentation, commit messages, TDD, and more.

Package Sidebar

Install

npm i ctci-chambers

Weekly Downloads

12

Version

2.2.0

License

ISC

Unpacked Size

17 kB

Total Files

18

Last publish

Collaborators

  • alexchambers