Giter VIP home page Giter VIP logo

ctci-solutions's Introduction

Cracking the Coding Interview (CtCI) Solutions"

This repository contains C++ and Python solutions to the problems in the sixth edition of Cracking the Coding Interview by Gayle Lackmann McDowell.

Chapter 1:

  • Is Unique - Determine if a string has all unique characters Overview
  • Check Permutation - Check if one string is a permutation of another Overview
  • URLify - Replace all spaces in string with '%20' Overview
  • Palindrome Permutation - Check if string is permutation of its palindrome Overview
  • One Away - Check if two strings are one or zero edits away Overview
  • String Compression - Perform string compression using counts of repeated characters Overview
  • Rotate Matrix - Rotate given nxn image by 90 degrees inplace Overview
  • Zero Matrix - Replace other elements in rows and columns if element is 0 Overview
  • String Rotation - Check if string s2 is rotation of string s1 using isSubstring() Overview

Chapter 2:

  • Remove Dups - Remove duplicates from unsorted linked list C++ | Python
  • Return Kth To Last - Find kth to last element of singly linked list C++ | Python
  • Delete middle node - Delete a node in middle of singly linked list C++ | Python
  • Partition - Partition singly linked list around x C++ | Python
  • Intersection - Given 2 SLL, check if they intersect C++ | Python
  • Loop Detection - Detect loop in Circular Linked List C++ | Python
  • Sum Lists - Add 2 numbers represented by Linked Lists C++ | Python

Chapter 3:

  • Three In One - Implement k(3) stacks using single array C++ | Python
  • Stack Min - Design min stack that performs push, pop and min in O(1) C++ | Python
  • Stack Of Plates - Implement set of stacks with popAt operation C++ | Python
  • Queue Via Stacks - Implement queue data structure with 2 stacks C++ | Python
  • Sort Stacks - Sort stack in ascending order using a temporary stack C++ | Python
  • Animal Shelter - Design system to allocate animals on FIFO basis from animal shelter C++ | Python

Todo's:

  • Readme per chapter explaining solutions
  • Blog posts per chapter
  • Code refactoring
  • Alternatives to organise readme in better manner

ctci-solutions's People

Contributors

avidlearnerinprogress avatar

Watchers

 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.