Skip to content

Instantly share code, notes, and snippets.

@eazybit
eazybit / FindUniqueStringUsingSet.cpp
Last active August 29, 2015 14:04
[C++] - Find unique strings in input values using set
///////////////////////////////////////////////////////////////////////////
// FindUniqueStringUsingSet.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: //
@eazybit
eazybit / MakeChange.cpp
Last active August 29, 2015 14:04
[C++] - Make Change
///////////////////////////////////////////////////////////////////////////
// MakeChange.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/29/cci150-c-make-change///
@eazybit
eazybit / FindString.cpp
Last active August 29, 2015 14:04
[C++] - Find a string in an sorted array of strings, interspersed with empty string
///////////////////////////////////////////////////////////////////////////
// FindString.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/23/cci150-c-find-a-string-in-an-sorted-array-of-strings-interspersed-with-empty-string///
@eazybit
eazybit / FindElementInSortedMatrix.cpp
Last active August 29, 2015 14:04
[C++] - Find an element in a matrix whose elements are sorted in each row and each column
///////////////////////////////////////////////////////////////////////////
// FindElementInSortedMatrix.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/23/cci150-c-find-an-element-in-a-matrix-whose-elements-are-sorted-in-each-row-and-each-column///
@eazybit
eazybit / InsertArray.cpp
Created July 23, 2014 20:57
[C++] - Insert a sorted array into another sorted array in sorted order
///////////////////////////////////////////////////////////////////////////
// InsertArray.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: //
@eazybit
eazybit / BinarySearch.cpp
Last active August 29, 2015 14:04
[C++] - Binary Search
///////////////////////////////////////////////////////////////////////////
// BinarySearch.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/23/c-binary-search///
@eazybit
eazybit / CountSort.cpp
Last active December 25, 2015 11:34
[C++] - Counting Sort
///////////////////////////////////////////////////////////////////////////
// CountingSort.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/22/c-counting-sort///
@eazybit
eazybit / QuickSort.cpp
Last active August 29, 2015 14:04
[C++] - Quick Sort
///////////////////////////////////////////////////////////////////////////
// QuickSort.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/22/c-quicksort///
@eazybit
eazybit / RadixSort.cpp
Last active October 24, 2015 21:23
[C++] - Radix Sort
///////////////////////////////////////////////////////////////////////////
// RadixSort .cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/22/c-radix-sort///
@eazybit
eazybit / MagicIndex.cpp
Last active August 29, 2015 14:04
[C++] - Find the magic index of an sorted array, where magic index i means a[i] = i
///////////////////////////////////////////////////////////////////////////
// MagicIndex.cpp //
// ver 1.0 //
// Type: source file //
// Language: C++ //
// Platform: Dell Alienware M14x, Win8 //
// Author: Yu Zhang, Syracuse University //
// zyu.1106@gmail.com //
// yzhan39@syr.edu //
// Description: http://www.yu-zhang.net/blog/2014/07/21/cci150-recursion-c-find-the-magic-index-of-an-sorted-array-where-magic-index-i-means-ai-i///