Fixed Constraints section label and link anchor.

This commit is contained in:
Donne Martin
2015-06-30 05:55:58 -04:00
parent b0a42468f1
commit e5fde7ea8c
29 changed files with 29 additions and 29 deletions

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3B1C2D4'\n", "## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3B1C2D4'\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm: List](#Algorithm:-List)\n", "* [Algorithm: List](#Algorithm:-List)\n",
"* [Code: List](#Code:-List)\n", "* [Code: List](#Code:-List)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement a hash table with set, get, and remove methods.\n", "## Problem: Implement a hash table with set, get, and remove methods.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Determine if a string is a permutation of another string\n", "## Problem: Determine if a string is a permutation of another string\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm: Compare Sorted Strings](#Algorithm:-Compare-Sorted-Strings)\n", "* [Algorithm: Compare Sorted Strings](#Algorithm:-Compare-Sorted-Strings)\n",
"* [Code: Compare Sorted Strings](#Code:-Compare-Sorted-Strings)\n", "* [Code: Compare Sorted Strings](#Code:-Compare-Sorted-Strings)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Given a string, replace in-place all spaces with '%20'\n", "## Problem: Given a string, replace in-place all spaces with '%20'\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement a function to reverse a string.\n", "## Problem: Implement a function to reverse a string.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Determine if a string s1 is a rotation of another string s2, by calling (only once) a function is_substring\n", "## Problem: Determine if a string s1 is a rotation of another string s2, by calling (only once) a function is_substring\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Determine if a string s1 is a rotation of another string s2, by calling (only once) a function is_substring\n", "## Problem: Determine if a string s1 is a rotation of another string s2, by calling (only once) a function is_substring\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement an algorithm to determine if a string has all unique characters\n", "## Problem: Implement an algorithm to determine if a string has all unique characters\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm 1: Sets and Length Comparison](#Algorithm-1:-Sets-and-Length-Comparison)\n", "* [Algorithm 1: Sets and Length Comparison](#Algorithm-1:-Sets-and-Length-Comparison)\n",
"* [Code: Sets and Length Comparison](#Code:-Sets-and-Length-Comparison)\n", "* [Code: Sets and Length Comparison](#Code:-Sets-and-Length-Comparison)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Add two numbers whose digits are stored in a linked list in reverse order.\n", "## Problem: Add two numbers whose digits are stored in a linked list in reverse order.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Delete a node in the middle, given only access to that node.\n", "## Problem: Delete a node in the middle, given only access to that node.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Find the start of a linked list loop.\n", "## Problem: Find the start of a linked list loop.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Find the kth to last element of a linked list\n", "## Problem: Find the kth to last element of a linked list\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement a linked list with insert, append, find, delete, length, and print methods\n", "## Problem: Implement a linked list with insert, append, find, delete, length, and print methods\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Determine if a linked list is a palindrome.\n", "## Problem: Determine if a linked list is a palindrome.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x.\n", "## Problem: Partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Remove duplicates from a linked list\n", "## Problem: Remove duplicates from a linked list\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm: Hash Map Lookup](#Algorithm:-Hash-Map-Lookup)\n", "* [Algorithm: Hash Map Lookup](#Algorithm:-Hash-Map-Lookup)\n",
"* [Code: Hash Map Lookup](#Code:-Hash-Map-Lookup)\n", "* [Code: Hash Map Lookup](#Code:-Hash-Map-Lookup)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement fibonacci recursively, dynamically, and iteratively.\n", "## Problem: Implement fibonacci recursively, dynamically, and iteratively.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code: Recursive](#Code:-Recursive)\n", "* [Code: Recursive](#Code:-Recursive)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement insertion sort.\n", "## Problem: Implement insertion sort.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement merge sort.\n", "## Problem: Implement merge sort.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement quick sort.\n", "## Problem: Implement quick sort.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement selection sort.\n", "## Problem: Implement selection sort.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement the [Towers of Hanoi](http://en.wikipedia.org/wiki/Tower_of_Hanoi) with 3 towers and N disks.\n", "## Problem: Implement the [Towers of Hanoi](http://en.wikipedia.org/wiki/Tower_of_Hanoi) with 3 towers and N disks.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement n stacks using a single array.\n", "## Problem: Implement n stacks using a single array.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement a queue using two stacks.\n", "## Problem: Implement a queue using two stacks.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement a queue with enqueue and dequeue methods using a linked list.\n", "## Problem: Implement a queue with enqueue and dequeue methods using a linked list.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement SetOfStacks that wraps a list of stacks, where each stack is bound by a capacity.\n", "## Problem: Implement SetOfStacks that wraps a list of stacks, where each stack is bound by a capacity.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Sort a stack. You can use another stack as a buffer.\n", "## Problem: Sort a stack. You can use another stack as a buffer.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement a stack with push, pop, peek, and is_empty methods using a linked list.\n", "## Problem: Implement a stack with push, pop, peek, and is_empty methods using a linked list.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",

View File

@@ -13,7 +13,7 @@
"source": [ "source": [
"## Problem: Implement a stack with push, pop, and min methods running O(1) time.\n", "## Problem: Implement a stack with push, pop, and min methods running O(1) time.\n",
"\n", "\n",
"* [Constraints and Assumptions](#Constraints-and-Assumptions)\n", "* [Constraints](#Constraints)\n",
"* [Test Cases](#Test-Cases)\n", "* [Test Cases](#Test-Cases)\n",
"* [Algorithm](#Algorithm)\n", "* [Algorithm](#Algorithm)\n",
"* [Code](#Code)\n", "* [Code](#Code)\n",