Giter Club home page Giter Club logo

algorithm-1's Introduction

Algorithm

Data Structure, algorithm, dynamic program, recursion and a little bit coding fun!

Introduction

You are welcome to use code. If you find any bug, please file an issue. I will fix it soon. I will continue publishing new code whenever I see any interesting coding puzzle.

What are included:

Puzzle Coding Fun:

[Puzzle Coding] (https://github.com/xiaoningning/algorithm/tree/master/PuzzleCoding) It includes a collection of fun coding puzzles.

  • AddBinary: add two binary number from string
  • AddTwoNumber: add two number from arrays
  • BSTtoDLL: convert binary search tree to double linked list
  • BTreeIterator: binary tree iterator: in-order, pre-order, post-order
  • BuildBT: build binary from array inputs
  • ClimbStairs: climb stair problem
  • CombinationPermutation: combination and permutation problems
  • CombinationSum: the sum of combination in array
  • CompareArrayBST: compare binary search tree
  • DecodeNumber: how many ways to decode number
  • FindMiddleShiftedSorted: find the middle elements of shifted sorted array
  • GenerateParentheses: generate parentheses and valid parentheses string
  • GrayCode: gray code
  • HanoiTower: Hanoi tower game
  • InsertCyclicList: insert element into a cyclic list
  • IntervalComparator: merge interval comparator class
  • IntToString: convert integer into A, B, C,.. AA, AB...
  • IsBST: validate binary search tree
  • IsBSTPostOrder: check if an array is a post-order bst.
  • JumpGame: Jump Game
  • LargestBSTSubtree: largest BST which may or may not include all children
  • LongestBalanceSubstring: longest balanced substring
  • LongestPalindrome: a linear way to find a longest palindrome string
  • LongestStringWithoutRepeat: longest string without repeat
  • MaxInWindow: max value in a sliding window
  • MergeIntervals: merge intervals
  • MergeSortedArray: k-way merge sorted arrays, using min heap
  • MinCostSortedArray: cost to sort array
  • MinCuttingWords: the minimal way to cut string based on dictionary
  • MinHeap: min heap implementation
  • MinPathSum: min sum of path (DP and Dijkstra)
  • MinWindowSubString: minimal window of substring
  • Node: tree node
  • Queen: Queen game
  • QueueByStack: implement queue with stack
  • Rand: Random number, rejecting sampling
  • RegexMatch: regex string match
  • ScrambleString: scramble string puzzle
  • SearchInRotatedSortedArray: search in rotated sorted array
  • SecondLargeInt: the second large int in array
  • SetMatrixZero: set matrix to zero (in-place)
  • SimplifyUnixPath: simply unix directory path
  • SpiralMatrix: generate spiral matrix
  • StablePartition: in-place partition array
  • StringAnagram: anagram string
  • ThreeSumClosest: three sum closest to a num in array
  • TreeLeafPath: tree leaf path print
  • Trie: trie implementation
  • ValidSudoku: valid Sudoku game
  • WordEditDistance: calculate the distance of word
  • ZigZagPrintMatrix: zigzag print matrix

Basic data structure and algorithm:

  • ActivityZero
  • allSubsets
  • BlockingQueue
  • boggleWords
  • boldTree
  • BTree
  • coin
  • DataCenterCooling
  • find2DArray
  • FindLargestSubMatrix
  • IntArrayOps
  • isNumber
  • longPalindromicString
  • LRU
  • MathOps
  • maxDist
  • MinCuttingWords
  • permutationStr
  • RePack
  • StringOps
  • sumZero
  • TreeOps
  • TriangleFunc
  • MirrorMaze

License

There is no license. If you want to use any code in book, please contact with me. Please feel free to refer the code with GitHub.

algorithm-1's People

Contributors

xiaoningning avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.