GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - justcoding121/cs-problems: Some 70+ interesting computer science problems and solutions in C#

BranchesTags
Open more actions menu

Latest commit

 

History

68 Commits
68 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 

Repository files navigation

Note:

Please don't take effort to create pull requests for new problems, algorithms or data structures. This is just a curiosity driven personal hobby and is not intented to be a library. Feel free fork and modify. You can however open issues or fix bugs with pull requests, I would be happy to take a look when I get time.

Development environment

  • Visual Studio 2017

CS Problems

Some interesting computer science problems and solutions in C#

Classic Dynamic Programming Problems

All are top down solutions with memoization technique.

  • Tower of hanoi (Implementation | Tests)
  • Fibonacci number generator (Implementation | Tests)
  • Optimal game strategy (Implementation | Tests)
  • Optimal Binary Search Tree (Implementation | Tests)

Matrix

  • Max submatrix (Implementation | Tests)
  • Min cost matrix path (Implementation | Tests)
  • Chain matrix multiplication (Implementation | Tests)
  • Max 1s Rectangle in matrix (Implementation | Tests)
  • Max 1s Square in matrix (Implementation | Tests)
  • Max subsquare with X sides in matrix (Implementation | Tests)

Counting

  • Count bool parenthesization (Implementation | Tests)
  • Count decoding (Implementation | Tests)
  • Dice throw (Implementation | Tests)
  • Count possible binary tree from a preorder sequence (Implementation | Tests)
  • Ways to cover a distance (Implementation | Tests)
  • Staircase problem in Fibonacci Series (Implementation | Tests)
  • Count digits (Implementation | Tests)

Maximizing

  • Knapsack problem (Implementation | Tests)
  • Max sum subsequence (Implementation | Tests)
  • Max increasing sum sequence (Implementation | Tests)
  • Max profit buy/sell stocks in K transactions (Implementation | Tests)
  • Box Stacking (Implementation | Tests)
  • Building Bridges (Implementation | Tests)
  • Burst Balloon (Implementation | Tests)
  • Cutting Rod (Implementation | Tests)
  • Print Max A's (Implementation | Tests)
  • Weighted Job Scheduling (Implementation | Tests)
  • Longest Chain (Implementation | Tests)

Minimizing

  • Coin change problem (Implementation | Tests)
  • Assembly line scheduling (Implementation | Tests)
  • Min Egg drop problem (Implementation | Tests)
  • Min edit distance (Implementation | Tests)
  • Min array jumps (Implementation | Tests)
  • Min adjustment cost (Implementation | Tests)

Palindrome

  • Longest palindrome (Implementation | Tests)
  • Shortest palindrome (Implementation | Tests)
  • Palindrome min cut (Min Partitioning) (Implementation | Tests)
  • Min deletion to get a palindrome (Implementation | Tests)

Sequence

  • Balanced partition (Implementation | Tests)
  • Distinct binary strings (Implementation | Tests)
  • Longest common subsequence (Implementation | Tests)
  • Longest increasing subsequence (Implementation | Tests)
  • Longest bitonic sequence (Implementation | Tests)

Sum

  • Subset sum (Implementation | Tests)

String

  • Wild card matching (Implementation | Tests)
  • String interleaving (Implementation | Tests)
  • Text Justification (Implementation | Tests)
  • Word Break problem (Implementation | Tests)

Bit Manipulation

  • Find the element that appears once (Implementation | Tests)
  • Find the two non-repeating elements in an array (Implementation | Tests)
  • Find two repeating elements in an array (Implementation | Tests)
  • Set bits in all numbers from 1 to n (Implementation | Tests)
  • Swap without temp (Implementation | Tests)
  • Swap all odd and even bits (Implementation | Tests)
  • Swap bits (Implementation | Tests)
  • Minimum or Maximum of two integers (Implementation | Tests)
  • Add two numbers using bitwise operators (Implementation | Tests)
  • Add 1 to a number (Implementation | Tests)
  • A Boolean Array Puzzle (Implementation | Tests)
  • Set bits in an (big) array (Implementation | Tests)
  • Next higher/lower number with same number of set bits (Implementation | Tests)
  • Absolute value (abs) without branching (Implementation | Tests)
  • Reverse Bits of a Number (Implementation | Tests)
  • Find parity (Implementation | Tests)
  • Maximum Subarray XOR (Implementation | Tests)
  • Magic Number (Implementation | Tests)
  • Sum of bit differences among all pairs (Implementation | Tests)
  • Find Next Sparse Number (Implementation | Tests)
  • Binary Subsets (Implementation | Tests)
  • Check if word has a zero byte (Implementation | Tests)
  • Interleave (Morton Number) (Implementation | Tests)
  • Flip a bit for longest ones sequence (Implementation | Tests)
  • Check if a Number is Multiple of 3 (Implementation | Tests)
  • Check if a number is multiple of 9 (Implementation | Tests)
  • Toggle upper/lower case (Implementation | Tests)
  • Modulus of division by power of two (Implementation | Tests)
  • Next Power of 2 (Implementation | Tests)
  • Int to Binary string (Implementation | Tests)

Miscellaneous

  • Count Inversions (Implementation | Tests)
  • Balanced Parentheses (Implementation | Tests)
  • Max ones with K flips (Implementation | Tests)
  • Matrix Multiplication (Implementation | Tests)
  • Sort an almost sorted array (Implementation | Tests)
  • Search on almost sorted array (Implementation | Tests)
  • Median of stream of numbers (Implementation | Tests)
  • Kth Smallest using binary heap (Implementation | Tests)
  • Expression Tree (Implementation | Tests)
  • Array in zig-zag fashion (Implementation | Tests)

About

Some 70+ interesting computer science problems and solutions in C#

Topics

algorithm-challengesbit-manipulationdynamic-programming

Resources

Readme
Activity

Stars

8 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.