/CrackingTheCodingInterview

My evolution through the Cracking The Coding Interview book

Primary LanguageJava

Cracking The Coding Interview Questions

This repo register my evolution in the Cracking The Coding Interview book as I go through its questions and solutions. Check the tests for the given solutions.

Hackerrank.com Challenges

SparseArrays

LonelyInteger

FlippingBits

DiagonalDifference

Counting Sort 1

Pangrams

SubArrayDivision1

Flipping the Matrix

Sales by Match

Drawing Book

Quicksort 1 - Partition

BoggleBoard

File System Recursion

Balanced Bracket

Staircase

Combine Arrays

AWS Challenges

Review Score

Optimizing Box Weights

Number of Suitable Locations

Get Max Charge

Chapter 2 | Linked Lists

2.1 Remove Dups: Write code to remove duplicates from an unsorted linked list.

Chapter 4 | Trees and Graphs

My Trie Implementation (insert/search)

My Binary Tree Implementation

My Binary Search Implementation

My Singly Linked List Implementation

My Doubly Linked List Implementation

Chapter 5 | Bit Manipulation

5.1 Insertion: You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to insert M into N such that M starts at bit j and ends at bit i. You can assume that the bits j through i have enough space to fit all of M. That is, if M=10011, you can assume that there ate at least 5 bits between j and i. You would not, for example, have j=3 and i=2, because M could not fully fit between bit 3 and 2.

5.3 Binary to String: You have an integer, and you can flip exactly one bit from 0 to 1. Write code to find the length of the longest sequence of 1's you could create.

5.4 Next Number: Given a positive integer, print the next smallest and the next largest number that have the same number of 1 bits in their binary representation.

5.6 Conversion: Write a function to determine the number of bits you would need to flip to convert integer A to integer B

5.7 Pairwise Swap: Write a program to swap odd and even bits in an integer with as few instructions as possible.

Chapter 10 | Sorting and Searching

My Quick Sort Implementation

OOP - Object Oriented Programming

Polymorphism

Abstraction

Encapsulation

Inheritance