├── README.md ├── imgs └── coding.jpg └── problem ├── Areacover.cpp ├── Array ├── Build b[i].cpp ├── Detect cycle in an array.cpp ├── Detect the longest cycle in an array.cpp ├── Diagonal elements sum of spiral matrix.cpp ├── Find none duplicate elements in two arrays.cpp ├── Find the max item A[i], such that A[i]=A[x]+A[y].cpp ├── Find the maximum repeating number in this array.cpp ├── Find the minimal difference between two sorted arrays.cpp ├── Generate all sequences such that.cpp ├── K-complementary.cpp ├── Length of First continuous subarray that sums to 0.cpp ├── Longest subarray with equal sum.cpp ├── Minimize max(a-b,b-c,c-a).cpp ├── Neargreatestelement.cpp ├── Partitionnarray.cpp ├── Replaced by k.cpp ├── Rotatearraydistance.cpp ├── Running average in a sliding window.cpp └── Stable 2 way partition.cpp ├── Bit └── Count the longest continuous bit 0s.cpp ├── Charset.cpp ├── Closestpairproblem.cpp ├── Construct a xml tree.cpp ├── Copy on write string.cpp ├── Coverboardwithtiles.cpp ├── Creategraph.cpp ├── Deepiterator.cpp ├── Design class support add delete and getRandom.cpp ├── Divideinteger.cpp ├── DynamicProgramming ├── Harryporterinmaze.cpp ├── Max production subarray.cpp ├── Maximalpathgain.cpp ├── Mergestones.cpp ├── Minimal subset sum.cpp └── Pizzapick.cpp ├── Editonewordindict.cpp ├── Equationsolution.cpp ├── Familyrelation.cpp ├── Find the largest sum.cpp ├── Given an array and a number k.cpp ├── Given an integer array and a range.cpp ├── Graph ├── Blackwhitereversegame.cpp ├── Bogglegame.cpp ├── Catchcow.cpp ├── Graph exists.cpp ├── Graphcomponents.cpp ├── How many carrots can the rabbit eat.cpp ├── Numberclosedrectangles.cpp ├── Spreadsheet.cpp ├── Totalshortestpath.cpp └── Traversalgrid.cpp ├── Groupcontact.cpp ├── Happy Number.cpp ├── Heap ├── Kth maximal element of sum of two arrays.cpp ├── Sliding Window Maximum.cpp ├── TwoDtopk.cpp └── Waterin2dhistogram.cpp ├── Implement malloc and free.cpp ├── Implement memmove and memcopy.cpp ├── Interface.cpp ├── Iterator for matrix.cpp ├── Jump the river.cpp ├── Largetreepreordertravsersal.cpp ├── Lastnlines.cpp ├── Latestversion.cpp ├── Length of shortest subarray with sum larger than S.cpp ├── Limiteddeque.cpp ├── LinkedList ├── Insert into a Cyclic Sorted List.cpp ├── List level sum.cpp └── Reversealternatelist.cpp ├── Magic Number.cpp ├── Math ├── Angle between the hour and minute.cpp ├── Calculate (m^n)%(10^k).cpp ├── Cancallfunction.cpp ├── Delete k digits.cpp ├── Factorialdigitsum.cpp ├── Find the LCM and GCD of two numbers.cpp ├── Find the duplicate element.cpp ├── Form a triangle.cpp ├── Get original number including digit 7.cpp ├── GetDecimal.cpp ├── Highest 1 position of binary expression.cpp ├── Last digit of a^b.cpp ├── MbasetoNbase.cpp ├── Number k=a^2 +b^2.cpp ├── Print all combinations.cpp ├── Print all the solutions.cpp ├── Printallnumwithdigit5.cpp ├── Readaline.cpp ├── Return the duplicate.cpp └── Specialnumber.cpp ├── MostPosts.cpp ├── Namenumbers.cpp ├── Nearest greater palindrome.cpp ├── Nearest guard.cpp ├── Numsquares.cpp ├── Onlineuser.cpp ├── PaintKhouses.cpp ├── Pairwithlargestcommonwords.cpp ├── Passwordlock.cpp ├── Patternsearchquestionmark.cpp ├── Perimetercover.cpp ├── Primefactors.cpp ├── Quadtree.cpp ├── Queryrelation.cpp ├── Racescore.cpp ├── Readk().cpp ├── Reverselines.cpp ├── SieveofEratosthenes.cpp ├── Size of the largest complete subtree.cpp ├── Skyline.cpp ├── Smallest positive number.cpp ├── Smart pointer.cpp ├── Sorting.cpp ├── SortingSearch ├── Find 1st one in large duplicated sorted array.cpp ├── Minimalelementinleftsortedarray.cpp └── Smallestmissingnumber.cpp ├── String ├── Allinterleaves.cpp ├── BinaryMatching.cpp ├── Chars with maximal number of consecutive counts.cpp ├── Delete repeating strings.cpp ├── DeleteAdoubleB.cpp ├── Edit Distance one.cpp ├── Find the replace rule.cpp ├── Firstanagram.cpp ├── GenerateParentheseswithdiffkinds.cpp ├── Getanumber.cpp ├── Kduplicates.cpp ├── Longest substring which appears more than once.cpp ├── LongestSubstring2uniquechars.cpp ├── LongestSubstringbeginend2uniquechars.cpp ├── Makesum.cpp ├── Mapstring.cpp ├── Minimalwordbreak.cpp ├── Onetwobyteencoding.cpp ├── Orderedminimumwindowsubstring.cpp ├── Remove comments.cpp ├── Sortfirstaccordingsecond.cpp ├── Twowords.cpp └── Vowel product.cpp ├── Stringencodedecode.cpp ├── ThiefProblem.cpp ├── Tree ├── Find the largest BST sub tree in BT.cpp ├── Find the right most node in each level of a binary tree.cpp ├── Generatebts.cpp ├── Heapify a binary tree.cpp ├── Immediate right neighbor.cpp ├── Implement getNextNode().cpp ├── Iterator for binary tree.cpp ├── Longest distance between two nodes.cpp ├── Maximalpathsum.cpp ├── Morris traversal of Binary Tree.cpp ├── Output true.cpp ├── PreInPostorder travel of bT with stack.cpp ├── Printing all nodes.cpp ├── Second largest node in BST.cpp ├── SerializeDeSerialize a binary tree.cpp ├── SerializeDeSerialize an arbitrary nodes tree.cpp ├── Shortest distance between two nodes.cpp ├── Statistical binary search tree.cpp ├── Switch binary tree to make equal.cpp ├── Totalweight.cpp └── Vertical sum in a binary tree.cpp ├── Turnofflight.cpp └── Uniqueshortestprefix.cpp /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/README.md -------------------------------------------------------------------------------- /imgs/coding.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/imgs/coding.jpg -------------------------------------------------------------------------------- /problem/Areacover.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Array/Build b[i].cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Build b[i].cpp -------------------------------------------------------------------------------- /problem/Array/Detect cycle in an array.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Detect cycle in an array.cpp -------------------------------------------------------------------------------- /problem/Array/Detect the longest cycle in an array.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Detect the longest cycle in an array.cpp -------------------------------------------------------------------------------- /problem/Array/Diagonal elements sum of spiral matrix.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Diagonal elements sum of spiral matrix.cpp -------------------------------------------------------------------------------- /problem/Array/Find none duplicate elements in two arrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Find none duplicate elements in two arrays.cpp -------------------------------------------------------------------------------- /problem/Array/Find the max item A[i], such that A[i]=A[x]+A[y].cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Find the max item A[i], such that A[i]=A[x]+A[y].cpp -------------------------------------------------------------------------------- /problem/Array/Find the maximum repeating number in this array.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Find the maximum repeating number in this array.cpp -------------------------------------------------------------------------------- /problem/Array/Find the minimal difference between two sorted arrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Find the minimal difference between two sorted arrays.cpp -------------------------------------------------------------------------------- /problem/Array/Generate all sequences such that.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Generate all sequences such that.cpp -------------------------------------------------------------------------------- /problem/Array/K-complementary.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/K-complementary.cpp -------------------------------------------------------------------------------- /problem/Array/Length of First continuous subarray that sums to 0.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Length of First continuous subarray that sums to 0.cpp -------------------------------------------------------------------------------- /problem/Array/Longest subarray with equal sum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Longest subarray with equal sum.cpp -------------------------------------------------------------------------------- /problem/Array/Minimize max(a-b,b-c,c-a).cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Minimize max(a-b,b-c,c-a).cpp -------------------------------------------------------------------------------- /problem/Array/Neargreatestelement.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Neargreatestelement.cpp -------------------------------------------------------------------------------- /problem/Array/Partitionnarray.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Partitionnarray.cpp -------------------------------------------------------------------------------- /problem/Array/Replaced by k.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Replaced by k.cpp -------------------------------------------------------------------------------- /problem/Array/Rotatearraydistance.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Rotatearraydistance.cpp -------------------------------------------------------------------------------- /problem/Array/Running average in a sliding window.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Running average in a sliding window.cpp -------------------------------------------------------------------------------- /problem/Array/Stable 2 way partition.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Array/Stable 2 way partition.cpp -------------------------------------------------------------------------------- /problem/Bit/Count the longest continuous bit 0s.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Bit/Count the longest continuous bit 0s.cpp -------------------------------------------------------------------------------- /problem/Charset.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /problem/Closestpairproblem.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /problem/Construct a xml tree.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Copy on write string.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Copy on write string.cpp -------------------------------------------------------------------------------- /problem/Coverboardwithtiles.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Creategraph.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /problem/Deepiterator.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Deepiterator.cpp -------------------------------------------------------------------------------- /problem/Design class support add delete and getRandom.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Design class support add delete and getRandom.cpp -------------------------------------------------------------------------------- /problem/Divideinteger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/DynamicProgramming/Harryporterinmaze.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/DynamicProgramming/Harryporterinmaze.cpp -------------------------------------------------------------------------------- /problem/DynamicProgramming/Max production subarray.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/DynamicProgramming/Max production subarray.cpp -------------------------------------------------------------------------------- /problem/DynamicProgramming/Maximalpathgain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/DynamicProgramming/Maximalpathgain.cpp -------------------------------------------------------------------------------- /problem/DynamicProgramming/Mergestones.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/DynamicProgramming/Mergestones.cpp -------------------------------------------------------------------------------- /problem/DynamicProgramming/Minimal subset sum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/DynamicProgramming/Minimal subset sum.cpp -------------------------------------------------------------------------------- /problem/DynamicProgramming/Pizzapick.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Editonewordindict.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Equationsolution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Equationsolution.cpp -------------------------------------------------------------------------------- /problem/Familyrelation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Familyrelation.cpp -------------------------------------------------------------------------------- /problem/Find the largest sum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Find the largest sum.cpp -------------------------------------------------------------------------------- /problem/Given an array and a number k.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Given an array and a number k.cpp -------------------------------------------------------------------------------- /problem/Given an integer array and a range.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Given an integer array and a range.cpp -------------------------------------------------------------------------------- /problem/Graph/Blackwhitereversegame.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Graph/Blackwhitereversegame.cpp -------------------------------------------------------------------------------- /problem/Graph/Bogglegame.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Graph/Catchcow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Graph/Catchcow.cpp -------------------------------------------------------------------------------- /problem/Graph/Graph exists.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Graph/Graph exists.cpp -------------------------------------------------------------------------------- /problem/Graph/Graphcomponents.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /problem/Graph/How many carrots can the rabbit eat.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Graph/How many carrots can the rabbit eat.cpp -------------------------------------------------------------------------------- /problem/Graph/Numberclosedrectangles.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Graph/Numberclosedrectangles.cpp -------------------------------------------------------------------------------- /problem/Graph/Spreadsheet.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Graph/Totalshortestpath.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Graph/Traversalgrid.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Graph/Traversalgrid.cpp -------------------------------------------------------------------------------- /problem/Groupcontact.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Groupcontact.cpp -------------------------------------------------------------------------------- /problem/Happy Number.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Happy Number.cpp -------------------------------------------------------------------------------- /problem/Heap/Kth maximal element of sum of two arrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Heap/Kth maximal element of sum of two arrays.cpp -------------------------------------------------------------------------------- /problem/Heap/Sliding Window Maximum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Heap/Sliding Window Maximum.cpp -------------------------------------------------------------------------------- /problem/Heap/TwoDtopk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Heap/TwoDtopk.cpp -------------------------------------------------------------------------------- /problem/Heap/Waterin2dhistogram.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Heap/Waterin2dhistogram.cpp -------------------------------------------------------------------------------- /problem/Implement malloc and free.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Implement malloc and free.cpp -------------------------------------------------------------------------------- /problem/Implement memmove and memcopy.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Implement memmove and memcopy.cpp -------------------------------------------------------------------------------- /problem/Interface.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Interface.cpp -------------------------------------------------------------------------------- /problem/Iterator for matrix.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Iterator for matrix.cpp -------------------------------------------------------------------------------- /problem/Jump the river.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Jump the river.cpp -------------------------------------------------------------------------------- /problem/Largetreepreordertravsersal.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | -------------------------------------------------------------------------------- /problem/Lastnlines.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Latestversion.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Length of shortest subarray with sum larger than S.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Length of shortest subarray with sum larger than S.cpp -------------------------------------------------------------------------------- /problem/Limiteddeque.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/LinkedList/Insert into a Cyclic Sorted List.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/LinkedList/Insert into a Cyclic Sorted List.cpp -------------------------------------------------------------------------------- /problem/LinkedList/List level sum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/LinkedList/List level sum.cpp -------------------------------------------------------------------------------- /problem/LinkedList/Reversealternatelist.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Magic Number.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | -------------------------------------------------------------------------------- /problem/Math/Angle between the hour and minute.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Angle between the hour and minute.cpp -------------------------------------------------------------------------------- /problem/Math/Calculate (m^n)%(10^k).cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Calculate (m^n)%(10^k).cpp -------------------------------------------------------------------------------- /problem/Math/Cancallfunction.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Cancallfunction.cpp -------------------------------------------------------------------------------- /problem/Math/Delete k digits.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Delete k digits.cpp -------------------------------------------------------------------------------- /problem/Math/Factorialdigitsum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Factorialdigitsum.cpp -------------------------------------------------------------------------------- /problem/Math/Find the LCM and GCD of two numbers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Find the LCM and GCD of two numbers.cpp -------------------------------------------------------------------------------- /problem/Math/Find the duplicate element.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Find the duplicate element.cpp -------------------------------------------------------------------------------- /problem/Math/Form a triangle.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Form a triangle.cpp -------------------------------------------------------------------------------- /problem/Math/Get original number including digit 7.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Get original number including digit 7.cpp -------------------------------------------------------------------------------- /problem/Math/GetDecimal.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/GetDecimal.cpp -------------------------------------------------------------------------------- /problem/Math/Highest 1 position of binary expression.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Highest 1 position of binary expression.cpp -------------------------------------------------------------------------------- /problem/Math/Last digit of a^b.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Last digit of a^b.cpp -------------------------------------------------------------------------------- /problem/Math/MbasetoNbase.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/MbasetoNbase.cpp -------------------------------------------------------------------------------- /problem/Math/Number k=a^2 +b^2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Number k=a^2 +b^2.cpp -------------------------------------------------------------------------------- /problem/Math/Print all combinations.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Print all combinations.cpp -------------------------------------------------------------------------------- /problem/Math/Print all the solutions.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Print all the solutions.cpp -------------------------------------------------------------------------------- /problem/Math/Printallnumwithdigit5.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Math/Readaline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Readaline.cpp -------------------------------------------------------------------------------- /problem/Math/Return the duplicate.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Return the duplicate.cpp -------------------------------------------------------------------------------- /problem/Math/Specialnumber.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Math/Specialnumber.cpp -------------------------------------------------------------------------------- /problem/MostPosts.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/MostPosts.cpp -------------------------------------------------------------------------------- /problem/Namenumbers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Namenumbers.cpp -------------------------------------------------------------------------------- /problem/Nearest greater palindrome.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Nearest guard.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Nearest guard.cpp -------------------------------------------------------------------------------- /problem/Numsquares.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Onlineuser.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Onlineuser.cpp -------------------------------------------------------------------------------- /problem/PaintKhouses.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Pairwithlargestcommonwords.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /problem/Passwordlock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Patternsearchquestionmark.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Patternsearchquestionmark.cpp -------------------------------------------------------------------------------- /problem/Perimetercover.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Primefactors.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Primefactors.cpp -------------------------------------------------------------------------------- /problem/Quadtree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Quadtree.cpp -------------------------------------------------------------------------------- /problem/Queryrelation.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Racescore.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Racescore.cpp -------------------------------------------------------------------------------- /problem/Readk().cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Readk().cpp -------------------------------------------------------------------------------- /problem/Reverselines.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/SieveofEratosthenes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/SieveofEratosthenes.cpp -------------------------------------------------------------------------------- /problem/Size of the largest complete subtree.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Size of the largest complete subtree in a binary tree 4 | 5 | */ 6 | 7 | -------------------------------------------------------------------------------- /problem/Skyline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Skyline.cpp -------------------------------------------------------------------------------- /problem/Smallest positive number.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Smart pointer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Smart pointer.cpp -------------------------------------------------------------------------------- /problem/Sorting.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Sorting.cpp -------------------------------------------------------------------------------- /problem/SortingSearch/Find 1st one in large duplicated sorted array.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/SortingSearch/Find 1st one in large duplicated sorted array.cpp -------------------------------------------------------------------------------- /problem/SortingSearch/Minimalelementinleftsortedarray.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/SortingSearch/Minimalelementinleftsortedarray.cpp -------------------------------------------------------------------------------- /problem/SortingSearch/Smallestmissingnumber.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/SortingSearch/Smallestmissingnumber.cpp -------------------------------------------------------------------------------- /problem/String/Allinterleaves.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Allinterleaves.cpp -------------------------------------------------------------------------------- /problem/String/BinaryMatching.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/BinaryMatching.cpp -------------------------------------------------------------------------------- /problem/String/Chars with maximal number of consecutive counts.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Chars with maximal number of consecutive counts.cpp -------------------------------------------------------------------------------- /problem/String/Delete repeating strings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Delete repeating strings.cpp -------------------------------------------------------------------------------- /problem/String/DeleteAdoubleB.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/DeleteAdoubleB.cpp -------------------------------------------------------------------------------- /problem/String/Edit Distance one.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Edit Distance one.cpp -------------------------------------------------------------------------------- /problem/String/Find the replace rule.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Find the replace rule.cpp -------------------------------------------------------------------------------- /problem/String/Firstanagram.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Firstanagram.cpp -------------------------------------------------------------------------------- /problem/String/GenerateParentheseswithdiffkinds.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/GenerateParentheseswithdiffkinds.cpp -------------------------------------------------------------------------------- /problem/String/Getanumber.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Getanumber.cpp -------------------------------------------------------------------------------- /problem/String/Kduplicates.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Kduplicates.cpp -------------------------------------------------------------------------------- /problem/String/Longest substring which appears more than once.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Longest substring which appears more than once.cpp -------------------------------------------------------------------------------- /problem/String/LongestSubstring2uniquechars.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/LongestSubstring2uniquechars.cpp -------------------------------------------------------------------------------- /problem/String/LongestSubstringbeginend2uniquechars.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/LongestSubstringbeginend2uniquechars.cpp -------------------------------------------------------------------------------- /problem/String/Makesum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Makesum.cpp -------------------------------------------------------------------------------- /problem/String/Mapstring.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Mapstring.cpp -------------------------------------------------------------------------------- /problem/String/Minimalwordbreak.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Minimalwordbreak.cpp -------------------------------------------------------------------------------- /problem/String/Onetwobyteencoding.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Onetwobyteencoding.cpp -------------------------------------------------------------------------------- /problem/String/Orderedminimumwindowsubstring.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Orderedminimumwindowsubstring.cpp -------------------------------------------------------------------------------- /problem/String/Remove comments.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Remove comments.cpp -------------------------------------------------------------------------------- /problem/String/Sortfirstaccordingsecond.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Sortfirstaccordingsecond.cpp -------------------------------------------------------------------------------- /problem/String/Twowords.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Twowords.cpp -------------------------------------------------------------------------------- /problem/String/Vowel product.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/String/Vowel product.cpp -------------------------------------------------------------------------------- /problem/Stringencodedecode.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/ThiefProblem.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Tree/Find the largest BST sub tree in BT.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Find the largest BST sub tree in BT.cpp -------------------------------------------------------------------------------- /problem/Tree/Find the right most node in each level of a binary tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Find the right most node in each level of a binary tree.cpp -------------------------------------------------------------------------------- /problem/Tree/Generatebts.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /problem/Tree/Heapify a binary tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Heapify a binary tree.cpp -------------------------------------------------------------------------------- /problem/Tree/Immediate right neighbor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Immediate right neighbor.cpp -------------------------------------------------------------------------------- /problem/Tree/Implement getNextNode().cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Implement getNextNode().cpp -------------------------------------------------------------------------------- /problem/Tree/Iterator for binary tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Iterator for binary tree.cpp -------------------------------------------------------------------------------- /problem/Tree/Longest distance between two nodes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Longest distance between two nodes.cpp -------------------------------------------------------------------------------- /problem/Tree/Maximalpathsum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Maximalpathsum.cpp -------------------------------------------------------------------------------- /problem/Tree/Morris traversal of Binary Tree.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | 5 | */ 6 | -------------------------------------------------------------------------------- /problem/Tree/Output true.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Output true.cpp -------------------------------------------------------------------------------- /problem/Tree/PreInPostorder travel of bT with stack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/PreInPostorder travel of bT with stack.cpp -------------------------------------------------------------------------------- /problem/Tree/Printing all nodes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Printing all nodes.cpp -------------------------------------------------------------------------------- /problem/Tree/Second largest node in BST.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Second largest node in BST.cpp -------------------------------------------------------------------------------- /problem/Tree/SerializeDeSerialize a binary tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/SerializeDeSerialize a binary tree.cpp -------------------------------------------------------------------------------- /problem/Tree/SerializeDeSerialize an arbitrary nodes tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/SerializeDeSerialize an arbitrary nodes tree.cpp -------------------------------------------------------------------------------- /problem/Tree/Shortest distance between two nodes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Shortest distance between two nodes.cpp -------------------------------------------------------------------------------- /problem/Tree/Statistical binary search tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Statistical binary search tree.cpp -------------------------------------------------------------------------------- /problem/Tree/Switch binary tree to make equal.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Switch binary tree to make equal.cpp -------------------------------------------------------------------------------- /problem/Tree/Totalweight.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Totalweight.cpp -------------------------------------------------------------------------------- /problem/Tree/Vertical sum in a binary tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkcheckzz/coding-questions/HEAD/problem/Tree/Vertical sum in a binary tree.cpp -------------------------------------------------------------------------------- /problem/Turnofflight.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /problem/Uniqueshortestprefix.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | */ 5 | 6 | --------------------------------------------------------------------------------