A collection of coding challenge examples completed in C# with added unit tests using NUnit.
ByteByByte (Source: https://www.byte-by-byte.com)
- Duplicates (Basic Recursive and Dynamic solutions) Given an array of integers where each value 1 <= x <= len(array), write a function that finds all the duplicates in the array.
- Knapsack (Basic Recursive and Dynamic solutions) Given a list of items with values and weights, as well as a max weight, find the maximum value you can generate from items where the sum of the weights is less than the max
- MatrixProduct (Standard and Cached Solution) Given a matrix, find the path from top left to bottom right with the greatest product by moving only down and right.
- MedianOfArrays (Multiple solutions) Find the median of two sorted arrays.
Codility (Source: https://codility.com)
A variety of the Codility example problems with added NUnit tests.
Implementations of a few basic data structures in C#.