You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"payload":{"allShortcutsEnabled":false,"fileTree":{"algorithms/cpp/fizzBuzz":{"items":[{"name":"FizzBuzz.cpp","path":"algorithms/cpp/fizzBuzz/FizzBuzz.cpp","contentType":"file"}],"totalCount":1},"algorithms/cpp":{"items":[{"name":"3Sum","path":"algorithms/cpp/3Sum","contentType":"directory"},{"name":"3SumClosest","path":"algorithms/cpp/3SumClosest","contentType":"directory"},{"name":"4Sum","path":"algorithms/cpp/4Sum","contentType":"directory"},{"name":"LRUCache","path":"algorithms/cpp/LRUCache","contentType":"directory"},{"name":"UTF8Validation","path":"algorithms/cpp/UTF8Validation","contentType":"directory"},{"name":"addAndSearchWord","path":"algorithms/cpp/addAndSearchWord","contentType":"directory"},{"name":"addBinary","path":"algorithms/cpp/addBinary","contentType":"directory"},{"name":"addDigits","path":"algorithms/cpp/addDigits","contentType":"directory"},{"name":"addStrings","path":"algorithms/cpp/addStrings","contentType":"directory"},{"name":"addTwoNumbers","path":"algorithms/cpp/addTwoNumbers","contentType":"directory"},{"name":"additiveNumber","path":"algorithms/cpp/additiveNumber","contentType":"directory"},{"name":"anagrams","path":"algorithms/cpp/anagrams","contentType":"directory"},{"name":"arithmeticSlices","path":"algorithms/cpp/arithmeticSlices","contentType":"directory"},{"name":"balancedBinaryTree","path":"algorithms/cpp/balancedBinaryTree","contentType":"directory"},{"name":"basicCalculator","path":"algorithms/cpp/basicCalculator","contentType":"directory"},{"name":"bestTimeToBuyAndSellStock","path":"algorithms/cpp/bestTimeToBuyAndSellStock","contentType":"directory"},{"name":"binarySearchTreeIterator","path":"algorithms/cpp/binarySearchTreeIterator","contentType":"directory"},{"name":"binaryTreeInorderTraversal","path":"algorithms/cpp/binaryTreeInorderTraversal","contentType":"directory"},{"name":"binaryTreeLevelOrderTraversal","path":"algorithms/cpp/binaryTreeLevelOrderTraversal","contentType":"directory"},{"name":"binaryTreeMaximumPathSum","path":"algorithms/cpp/binaryTreeMaximumPathSum","contentType":"directory"},{"name":"binaryTreePaths","path":"algorithms/cpp/binaryTreePaths","contentType":"directory"},{"name":"binaryTreePostorderTraversal","path":"algorithms/cpp/binaryTreePostorderTraversal","contentType":"directory"},{"name":"binaryTreePreorderTraversal","path":"algorithms/cpp/binaryTreePreorderTraversal","contentType":"directory"},{"name":"binaryTreeRightSideView","path":"algorithms/cpp/binaryTreeRightSideView","contentType":"directory"},{"name":"binaryTreeUpsideDown","path":"algorithms/cpp/binaryTreeUpsideDown","contentType":"directory"},{"name":"binaryTreeZigzagLevelOrderTraversal","path":"algorithms/cpp/binaryTreeZigzagLevelOrderTraversal","contentType":"directory"},{"name":"binaryWatch","path":"algorithms/cpp/binaryWatch","contentType":"directory"},{"name":"bitwiseANDOfNumbersRange","path":"algorithms/cpp/bitwiseANDOfNumbersRange","contentType":"directory"},{"name":"bulbSwitcher","path":"algorithms/cpp/bulbSwitcher","contentType":"directory"},{"name":"bullsAndCows","path":"algorithms/cpp/bullsAndCows","contentType":"directory"},{"name":"burstBalloons","path":"algorithms/cpp/burstBalloons","contentType":"directory"},{"name":"candy","path":"algorithms/cpp/candy","contentType":"directory"},{"name":"climbStairs","path":"algorithms/cpp/climbStairs","contentType":"directory"},{"name":"cloneGraph","path":"algorithms/cpp/cloneGraph","contentType":"directory"},{"name":"coinChange","path":"algorithms/cpp/coinChange","contentType":"directory"},{"name":"combinationSum","path":"algorithms/cpp/combinationSum","contentType":"directory"},{"name":"combinationSumIV","path":"algorithms/cpp/combinationSumIV","contentType":"directory"},{"name":"combinations","path":"algorithms/cpp/combinations","contentType":"directory"},{"name":"compareVersionNumbers","path":"algorithms/cpp/compareVersionNumbers","contentType":"directory"},{"name":"constructBinaryTreeFromInorderAndPostorderTraversal","path":"algorithms/cpp/constructBinaryTreeFromInorderAndPostorderTraversal","contentType":"directory"},{"name":"constructBinaryTreeFromPreorderAndInorderTraversal","path":"algorithms/cpp/constructBinaryTreeFromPreorderAndInorderTraversal","contentType":"directory"},{"name":"containerWithMostWater","path":"algorithms/cpp/containerWithMostWater","contentType":"directory"},{"name":"containsDuplicate","path":"algorithms/cpp/containsDuplicate","contentType":"directory"},{"name":"convertANumberToHexadecimal","path":"algorithms/cpp/convertANumberToHexadecimal","contentType":"directory"},{"name":"convertSortedArrayToBinarySearchTree","path":"algorithms/cpp/convertSortedArrayToBinarySearchTree","contentType":"directory"},{"name":"convertSortedListToBinarySearchTree","path":"algorithms/cpp/convertSortedListToBinarySearchTree","contentType":"directory"},{"name":"copyListWithRandomPointer","path":"algorithms/cpp/copyListWithRandomPointer","contentType":"directory"},{"name":"countAndSay","path":"algorithms/cpp/countAndSay","contentType":"directory"},{"name":"countCompleteTreeNodes","path":"algorithms/cpp/countCompleteTreeNodes","contentType":"directory"},{"name":"countOfRangeSum","path":"algorithms/cpp/countOfRangeSum","contentType":"directory"},{"name":"countOfSmallerNumbersAfterSelf","path":"algorithms/cpp/countOfSmallerNumbersAfterSelf","contentType":"directory"},{"name":"countPrimes","path":"algorithms/cpp/countPrimes","contentType":"directory"},{"name":"countingBits","path":"algorithms/cpp/countingBits","contentType":"directory"},{"name":"courseSchedule","path":"algorithms/cpp/courseSchedule","contentType":"directory"},{"name":"createMaximumNumber","path":"algorithms/cpp/createMaximumNumber","contentType":"directory"},{"name":"decodeString","path":"algorithms/cpp/decodeString","contentType":"directory"},{"name":"decodeWays","path":"algorithms/cpp/decodeWays","contentType":"directory"},{"name":"deleteNodeInALinkedList","path":"algorithms/cpp/deleteNodeInALinkedList","contentType":"directory"},{"name":"differentWaysToAddParentheses","path":"algorithms/cpp/differentWaysToAddParentheses","contentType":"directory"},{"name":"distinctSubsequences","path":"algorithms/cpp/distinctSubsequences","contentType":"directory"},{"name":"divideTwoInt","path":"algorithms/cpp/divideTwoInt","contentType":"directory"},{"name":"dungeonGame","path":"algorithms/cpp/dungeonGame","contentType":"directory"},{"name":"editDistance","path":"algorithms/cpp/editDistance","contentType":"directory"},{"name":"eliminationGame","path":"algorithms/cpp/eliminationGame","contentType":"directory"},{"name":"evaluateDivision","path":"algorithms/cpp/evaluateDivision","contentType":"directory"},{"name":"evaluateReversePolishNotation","path":"algorithms/cpp/evaluateReversePolishNotation","contentType":"directory"},{"name":"excelSheetColumnNumber","path":"algorithms/cpp/excelSheetColumnNumber","contentType":"directory"},{"name":"excelSheetColumnTitle","path":"algorithms/cpp/excelSheetColumnTitle","contentType":"directory"},{"name":"expressionAddOperators","path":"algorithms/cpp/expressionAddOperators","contentType":"directory"},{"name":"factorialTrailingZeroes","path":"algorithms/cpp/factorialTrailingZeroes","contentType":"directory"},{"name":"findMedianFromDataStream","path":"algorithms/cpp/findMedianFromDataStream","contentType":"directory"},{"name":"findMinimumInRotatedSortedArray","path":"algorithms/cpp/findMinimumInRotatedSortedArray","contentType":"directory"},{"name":"findPeakElement","path":"algorithms/cpp/findPeakElement","contentType":"directory"},{"name":"findTheDifference","path":"algorithms/cpp/findTheDifference","contentType":"directory"},{"name":"findTheDuplicateNumber","path":"algorithms/cpp/findTheDuplicateNumber","contentType":"directory"},{"name":"firstBadVersion","path":"algorithms/cpp/firstBadVersion","contentType":"directory"},{"name":"firstMissingPositive","path":"algorithms/cpp/firstMissingPositive","contentType":"directory"},{"name":"firstUniqueCharacterInAString","path":"algorithms/cpp/firstUniqueCharacterInAString","contentType":"directory"},{"name":"fizzBuzz","path":"algorithms/cpp/fizzBuzz","contentType":"directory"},{"name":"flattenBinaryTreeToLinkedList","path":"algorithms/cpp/flattenBinaryTreeToLinkedList","contentType":"directory"},{"name":"flattenNestedListIterator","path":"algorithms/cpp/flattenNestedListIterator","contentType":"directory"},{"name":"fractionToRecurringDecimal","path":"algorithms/cpp/fractionToRecurringDecimal","contentType":"directory"},{"name":"frogJump","path":"algorithms/cpp/frogJump","contentType":"directory"},{"name":"gasStation","path":"algorithms/cpp/gasStation","contentType":"directory"},{"name":"generateParentheses","path":"algorithms/cpp/generateParentheses","contentType":"directory"},{"name":"grayCode","path":"algorithms/cpp/grayCode","contentType":"directory"},{"name":"h-Index","path":"algorithms/cpp/h-Index","contentType":"directory"},{"name":"happyNumber","path":"algorithms/cpp/happyNumber","contentType":"directory"},{"name":"houseRobber","path":"algorithms/cpp/houseRobber","contentType":"directory"},{"name":"implementQueueUsingStacks","path":"algorithms/cpp/implementQueueUsingStacks","contentType":"directory"},{"name":"implementStackUsingQueues","path":"algorithms/cpp/implementStackUsingQueues","contentType":"directory"},{"name":"implementTriePrefixTree","path":"algorithms/cpp/implementTriePrefixTree","contentType":"directory"},{"name":"increasingTripletSubsequence","path":"algorithms/cpp/increasingTripletSubsequence","contentType":"directory"},{"name":"insertDeleteGetRandom","path":"algorithms/cpp/insertDeleteGetRandom","contentType":"directory"},{"name":"insertInterval","path":"algorithms/cpp/insertInterval","contentType":"directory"},{"name":"insertionSortList","path":"algorithms/cpp/insertionSortList","contentType":"directory"},{"name":"integerBreak","path":"algorithms/cpp/integerBreak","contentType":"directory"},{"name":"integerReplacement","path":"algorithms/cpp/integerReplacement","contentType":"directory"},{"name":"integerToEnglishWords","path":"algorithms/cpp/integerToEnglishWords","contentType":"directory"},{"name":"integerToRoman","path":"algorithms/cpp/integerToRoman","contentType":"directory"},{"name":"interleavingString","path":"algorithms/cpp/interleavingString","contentType":"directory"},{"name":"intersectionOfTwoArrays","path":"algorithms/cpp/intersectionOfTwoArrays","contentType":"directory"},{"name":"intersectionOfTwoLinkedLists","path":"algorithms/cpp/intersectionOfTwoLinkedLists","contentType":"directory"},{"name":"invertBinaryTree","path":"algorithms/cpp/invertBinaryTree","contentType":"directory"},{"name":"isSubsequence","path":"algorithms/cpp/isSubsequence","contentType":"directory"},{"name":"isomorphicStrings","path":"algorithms/cpp/isomorphicStrings","contentType":"directory"},{"name":"jumpGame","path":"algorithms/cpp/jumpGame","contentType":"directory"},{"name":"kthLargestElementInAnArray","path":"algorithms/cpp/kthLargestElementInAnArray","contentType":"directory"},{"name":"kthSmallestElementInaBST","path":"algorithms/cpp/kthSmallestElementInaBST","contentType":"directory"},{"name":"largestNumber","path":"algorithms/cpp/largestNumber","contentType":"directory"},{"name":"largestRectangleInHistogram","path":"algorithms/cpp/largestRectangleInHistogram","contentType":"directory"},{"name":"lengthOfLastWord","path":"algorithms/cpp/lengthOfLastWord","contentType":"directory"},{"name":"letterCombinationsOfAPhoneNumber","path":"algorithms/cpp/letterCombinationsOfAPhoneNumber","contentType":"directory"},{"name":"lexicographicalNumbers","path":"algorithms/cpp/lexicographicalNumbers","contentType":"directory"},{"name":"linkedListCycle","path":"algorithms/cpp/linkedListCycle","contentType":"directory"},{"name":"linkedListRandomNode","path":"algorithms/cpp/linkedListRandomNode","contentType":"directory"},{"name":"longestAbsoluteFilePath","path":"algorithms/cpp/longestAbsoluteFilePath","contentType":"directory"},{"name":"longestCommonPrefix","path":"algorithms/cpp/longestCommonPrefix","contentType":"directory"},{"name":"longestConsecutiveSequence","path":"algorithms/cpp/longestConsecutiveSequence","contentType":"directory"},{"name":"longestIncreasingPathInAMatrix","path":"algorithms/cpp/longestIncreasingPathInAMatrix","contentType":"directory"},{"name":"longestIncreasingSubsequence","path":"algorithms/cpp/longestIncreasingSubsequence","contentType":"directory"},{"name":"longestPalindrome","path":"algorithms/cpp/longestPalindrome","contentType":"directory"},{"name":"longestPalindromicSubstring","path":"algorithms/cpp/longestPalindromicSubstring","contentType":"directory"},{"name":"longestSubstringWithAtLeastKRepeatingCharacters","path":"algorithms/cpp/longestSubstringWithAtLeastKRepeatingCharacters","contentType":"directory"},{"name":"longestSubstringWithAtMostTwoDistinctCharacters","path":"algorithms/cpp/longestSubstringWithAtMostTwoDistinctCharacters","contentType":"directory"},{"name":"longestSubstringWithoutRepeatingCharacters","path":"algorithms/cpp/longestSubstringWithoutRepeatingCharacters","contentType":"directory"},{"name":"longestValidParentheses","path":"algorithms/cpp/longestValidParentheses","contentType":"directory"},{"name":"lowestCommonAncestorOfABinarySearchTree","path":"algorithms/cpp/lowestCommonAncestorOfABinarySearchTree","contentType":"directory"},{"name":"lowestCommonAncestorOfABinaryTree","path":"algorithms/cpp/lowestCommonAncestorOfABinaryTree","contentType":"directory"},{"name":"majorityElement","path":"algorithms/cpp/majorityElement","contentType":"directory"},{"name":"maxPointsOnALine","path":"algorithms/cpp/maxPointsOnALine","contentType":"directory"},{"name":"maximalRectangle","path":"algorithms/cpp/maximalRectangle","contentType":"directory"},{"name":"maximalSquare","path":"algorithms/cpp/maximalSquare","contentType":"directory"},{"name":"maximumDepthOfBinaryTree","path":"algorithms/cpp/maximumDepthOfBinaryTree","contentType":"directory"},{"name":"maximumGap","path":"algorithms/cpp/maximumGap","contentType":"directory"},{"name":"maximumProductOfWordLengths","path":"algorithms/cpp/maximumProductOfWordLengths","contentType":"directory"},{"name":"maximumProductSubarray","path":"algorithms/cpp/maximumProductSubarray","contentType":"directory"},{"name":"maximumSubArray","path":"algorithms/cpp/maximumSubArray","contentType":"directory"},{"name":"medianOfTwoSortedArrays","path":"algorithms/cpp/medianOfTwoSortedArrays","contentType":"directory"},{"name":"mergeIntervals","path":"algorithms/cpp/mergeIntervals","contentType":"directory"},{"name":"mergeKSortedLists","path":"algorithms/cpp/mergeKSortedLists","contentType":"directory"},{"name":"mergeTwoSortedArray","path":"algorithms/cpp/mergeTwoSortedArray","contentType":"directory"},{"name":"mergeTwoSortedList","path":"algorithms/cpp/mergeTwoSortedList","contentType":"directory"},{"name":"minStack","path":"algorithms/cpp/minStack","contentType":"directory"},{"name":"miniParser","path":"algorithms/cpp/miniParser","contentType":"directory"},{"name":"minimumDepthOfBinaryTree","path":"algorithms/cpp/minimumDepthOfBinaryTree","contentType":"directory"},{"name":"minimumHeightTrees","path":"algorithms/cpp/minimumHeightTrees","contentType":"directory"},{"name":"minimumPathSum","path":"algorithms/cpp/minimumPathSum","contentType":"directory"},{"name":"minimumSizeSubarraySum","path":"algorithms/cpp/minimumSizeSubarraySum","contentType":"directory"},{"name":"minimumWindowSubstring","path":"algorithms/cpp/minimumWindowSubstring","contentType":"directory"},{"name":"missingNumber","path":"algorithms/cpp/missingNumber","contentType":"directory"},{"name":"missingRanges","path":"algorithms/cpp/missingRanges","contentType":"directory"},{"name":"moveZeroes","path":"algorithms/cpp/moveZeroes","contentType":"directory"},{"name":"multiplyStrings","path":"algorithms/cpp/multiplyStrings","contentType":"directory"},{"name":"nQueens","path":"algorithms/cpp/nQueens","contentType":"directory"},{"name":"nextPermutation","path":"algorithms/cpp/nextPermutation","contentType":"directory"},{"name":"nimGame","path":"algorithms/cpp/nimGame","contentType":"directory"},{"name":"nthDigit","path":"algorithms/cpp/nthDigit","contentType":"directory"},{"name":"numberOf1Bits","path":"algorithms/cpp/numberOf1Bits","contentType":"directory"},{"name":"numberOfDigitOne","path":"algorithms/cpp/numberOfDigitOne","contentType":"directory"},{"name":"numberOfIslands","path":"algorithms/cpp/numberOfIslands","contentType":"directory"},{"name":"oddEvenLinkedList","path":"algorithms/cpp/oddEvenLinkedList","contentType":"directory"},{"name":"oneEditDistance","path":"algorithms/cpp/oneEditDistance","contentType":"directory"},{"name":"palindromeLinkedList","path":"algorithms/cpp/palindromeLinkedList","contentType":"directory"},{"name":"palindromeNumber","path":"algorithms/cpp/palindromeNumber","contentType":"directory"},{"name":"palindromePartitioning","path":"algorithms/cpp/palindromePartitioning","contentType":"directory"},{"name":"partitionList","path":"algorithms/cpp/partitionList","contentType":"directory"},{"name":"pascalTriangle","path":"algorithms/cpp/pascalTriangle","contentType":"directory"},{"name":"patchingArray","path":"algorithms/cpp/patchingArray","contentType":"directory"},{"name":"pathSum","path":"algorithms/cpp/pathSum","contentType":"directory"},{"name":"peekingIterator","path":"algorithms/cpp/peekingIterator","contentType":"directory"},{"name":"perfectRectangle","path":"algorithms/cpp/perfectRectangle","contentType":"directory"},{"name":"perfectSquares","path":"algorithms/cpp/perfectSquares","contentType":"directory"},{"name":"permutationSequence","path":"algorithms/cpp/permutationSequence","contentType":"directory"},{"name":"permutations","path":"algorithms/cpp/permutations","contentType":"directory"},{"name":"plusOne","path":"algorithms/cpp/plusOne","contentType":"directory"},{"name":"populatingNextRightPointersInEachNode","path":"algorithms/cpp/populatingNextRightPointersInEachNode","contentType":"directory"},{"name":"pow","path":"algorithms/cpp/pow","contentType":"directory"},{"name":"powerOfFour","path":"algorithms/cpp/powerOfFour","contentType":"directory"},{"name":"powerOfThree","path":"algorithms/cpp/powerOfThree","contentType":"directory"},{"name":"powerOfTwo","path":"algorithms/cpp/powerOfTwo","contentType":"directory"},{"name":"productOfArrayExceptSelf","path":"algorithms/cpp/productOfArrayExceptSelf","contentType":"directory"},{"name":"queueReconstructionByHeight","path":"algorithms/cpp/queueReconstructionByHeight","contentType":"directory"},{"name":"randomPickIndex","path":"algorithms/cpp/randomPickIndex","contentType":"directory"},{"name":"rangeSumQuery-Immutable","path":"algorithms/cpp/rangeSumQuery-Immutable","contentType":"directory"},{"name":"rangeSumQuery2D-Immutable","path":"algorithms/cpp/rangeSumQuery2D-Immutable","contentType":"directory"},{"name":"ransomNote","path":"algorithms/cpp/ransomNote","contentType":"directory"},{"name":"readNCharactersGivenRead4","path":"algorithms/cpp/readNCharactersGivenRead4","contentType":"directory"},{"name":"reconstructItinerary","path":"algorithms/cpp/reconstructItinerary","contentType":"directory"},{"name":"recoverBinarySearchTree","path":"algorithms/cpp/recoverBinarySearchTree","contentType":"directory"},{"name":"rectangleArea","path":"algorithms/cpp/rectangleArea","contentType":"directory"},{"name":"regularExpressionMatching","path":"algorithms/cpp/regularExpressionMatching","contentType":"directory"},{"name":"removeDuplicateLetters","path":"algorithms/cpp/removeDuplicateLetters","contentType":"directory"},{"name":"removeDuplicatesFromSortedArray","path":"algorithms/cpp/removeDuplicatesFromSortedArray","contentType":"directory"},{"name":"removeDuplicatesFromSortedList","path":"algorithms/cpp/removeDuplicatesFromSortedList","contentType":"directory"},{"name":"removeElement","path":"algorithms/cpp/removeElement","contentType":"directory"},{"name":"removeInvalidParentheses","path":"algorithms/cpp/removeInvalidParentheses","contentType":"directory"},{"name":"removeKDigits","path":"algorithms/cpp/removeKDigits","contentType":"directory"},{"name":"removeLinkedListElements","path":"algorithms/cpp/removeLinkedListElements","contentType":"directory"},{"name":"removeNthNodeFromEndOfList","path":"algorithms/cpp/removeNthNodeFromEndOfList","contentType":"directory"},{"name":"reorderList","path":"algorithms/cpp/reorderList","contentType":"directory"},{"name":"repeatedDNASequences","path":"algorithms/cpp/repeatedDNASequences","contentType":"directory"},{"name":"restoreIPAddresses","path":"algorithms/cpp/restoreIPAddresses","contentType":"directory"},{"name":"reverseBits","path":"algorithms/cpp/reverseBits","contentType":"directory"},{"name":"reverseInteger","path":"algorithms/cpp/reverseInteger","contentType":"directory"},{"name":"reverseLinkedList","path":"algorithms/cpp/reverseLinkedList","contentType":"directory"},{"name":"reverseNodesInKGroup","path":"algorithms/cpp/reverseNodesInKGroup","contentType":"directory"},{"name":"reverseString","path":"algorithms/cpp/reverseString","contentType":"directory"},{"name":"reverseVowelsOfAString","path":"algorithms/cpp/reverseVowelsOfAString","contentType":"directory"},{"name":"reverseWordsInAString","path":"algorithms/cpp/reverseWordsInAString","contentType":"directory"},{"name":"romanToInteger","path":"algorithms/cpp/romanToInteger","contentType":"directory"},{"name":"rotateArray","path":"algorithms/cpp/rotateArray","contentType":"directory"},{"name":"rotateFunction","path":"algorithms/cpp/rotateFunction","contentType":"directory"},{"name":"rotateImage","path":"algorithms/cpp/rotateImage","contentType":"directory"},{"name":"rotateList","path":"algorithms/cpp/rotateList","contentType":"directory"},{"name":"sameTree","path":"algorithms/cpp/sameTree","contentType":"directory"},{"name":"scrambleString","path":"algorithms/cpp/scrambleString","contentType":"directory"},{"name":"search2DMatrix","path":"algorithms/cpp/search2DMatrix","contentType":"directory"},{"name":"searchForRange","path":"algorithms/cpp/searchForRange","contentType":"directory"},{"name":"searchInRotatedSortedArray","path":"algorithms/cpp/searchInRotatedSortedArray","contentType":"directory"},{"name":"searchInsertPosition","path":"algorithms/cpp/searchInsertPosition","contentType":"directory"},{"name":"serializeAndDeserializeBinaryTree","path":"algorithms/cpp/serializeAndDeserializeBinaryTree","contentType":"directory"},{"name":"setMatrixZeroes","path":"algorithms/cpp/setMatrixZeroes","contentType":"directory"},{"name":"shortestPalindrome","path":"algorithms/cpp/shortestPalindrome","contentType":"directory"},{"name":"shuffleAnArray","path":"algorithms/cpp/shuffleAnArray","contentType":"directory"},{"name":"simplifyPath","path":"algorithms/cpp/simplifyPath","contentType":"directory"},{"name":"singleNumber","path":"algorithms/cpp/singleNumber","contentType":"directory"},{"name":"slidingWindowMaximum","path":"algorithms/cpp/slidingWindowMaximum","contentType":"directory"},{"name":"sortColors","path":"algorithms/cpp/sortColors","contentType":"directory"},{"name":"sortList","path":"algorithms/cpp/sortList","contentType":"directory"},{"name":"spiralMatrix","path":"algorithms/cpp/spiralMatrix","contentType":"directory"},{"name":"splitArrayLargestSum","path":"algorithms/cpp/splitArrayLargestSum","contentType":"directory"},{"name":"sqrt","path":"algorithms/cpp/sqrt","contentType":"directory"},{"name":"strStr","path":"algorithms/cpp/strStr","contentType":"directory"},{"name":"stringToIntegerAtoi","path":"algorithms/cpp/stringToIntegerAtoi","contentType":"directory"},{"name":"subsets","path":"algorithms/cpp/subsets","contentType":"directory"},{"name":"substringWithConcatenationOfAllWords","path":"algorithms/cpp/substringWithConcatenationOfAllWords","contentType":"directory"},{"name":"sudokuSolver","path":"algorithms/cpp/sudokuSolver","contentType":"directory"},{"name":"sumOfLeftLeaves","path":"algorithms/cpp/sumOfLeftLeaves","contentType":"directory"},{"name":"sumRootToLeafNumber","path":"algorithms/cpp/sumRootToLeafNumber","contentType":"directory"},{"name":"summaryRanges","path":"algorithms/cpp/summaryRanges","contentType":"directory"},{"name":"superUglyNumber","path":"algorithms/cpp/superUglyNumber","contentType":"directory"},{"name":"surroundedRegions","path":"algorithms/cpp/surroundedRegions","contentType":"directory"},{"name":"swapNodesInPairs","path":"algorithms/cpp/swapNodesInPairs","contentType":"directory"},{"name":"symmetricTree","path":"algorithms/cpp/symmetricTree","contentType":"directory"},{"name":"textJustification","path":"algorithms/cpp/textJustification","contentType":"directory"},{"name":"theSkylineProblem","path":"algorithms/cpp/theSkylineProblem","contentType":"directory"},{"name":"thirdMaximumNumber","path":"algorithms/cpp/thirdMaximumNumber","contentType":"directory"},{"name":"topKFrequentElements","path":"algorithms/cpp/topKFrequentElements","contentType":"directory"},{"name":"totalHammingDistance","path":"algorithms/cpp/totalHammingDistance","contentType":"directory"},{"name":"trappingRainWater","path":"algorithms/cpp/trappingRainWater","contentType":"directory"},{"name":"triangle","path":"algorithms/cpp/triangle","contentType":"directory"},{"name":"twoSum","path":"algorithms/cpp/twoSum","contentType":"directory"},{"name":"uglyNumber","path":"algorithms/cpp/uglyNumber","contentType":"directory"},{"name":"uniqueBinarySearchTrees","path":"algorithms/cpp/uniqueBinarySearchTrees","contentType":"directory"},{"name":"uniquePaths","path":"algorithms/cpp/uniquePaths","contentType":"directory"},{"name":"validNumber","path":"algorithms/cpp/validNumber","contentType":"directory"},{"name":"validPalindrome","path":"algorithms/cpp/validPalindrome","contentType":"directory"},{"name":"validParentheses","path":"algorithms/cpp/validParentheses","contentType":"directory"},{"name":"validSudoku","path":"algorithms/cpp/validSudoku","contentType":"directory"},{"name":"validateBinarySearchTree","path":"algorithms/cpp/validateBinarySearchTree","contentType":"directory"},{"name":"verifyPreorderSerializationOfABinaryTree","path":"algorithms/cpp/verifyPreorderSerializationOfABinaryTree","contentType":"directory"},{"name":"wiggleSort","path":"algorithms/cpp/wiggleSort","contentType":"directory"},{"name":"wiggleSubsequence","path":"algorithms/cpp/wiggleSubsequence","contentType":"directory"},{"name":"wildcardMatching","path":"algorithms/cpp/wildcardMatching","contentType":"directory"},{"name":"wordBreak","path":"algorithms/cpp/wordBreak","contentType":"directory"},{"name":"wordLadder","path":"algorithms/cpp/wordLadder","contentType":"directory"},{"name":"wordPattern","path":"algorithms/cpp/wordPattern","contentType":"directory"},{"name":"wordSearch","path":"algorithms/cpp/wordSearch","contentType":"directory"},{"name":"zigZagConversion","path":"algorithms/cpp/zigZagConversion","contentType":"directory"}],"totalCount":270},"algorithms":{"items":[{"name":"cpp","path":"algorithms/cpp","contentType":"directory"},{"name":"java","path":"algorithms/java","contentType":"directory"},{"name":"js","path":"algorithms/js","contentType":"directory"}],"totalCount":3},"":{"items":[{"name":"algorithms","path":"algorithms","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"shell","path":"shell","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"}],"totalCount":5}},"fileTreeProcessingTime":25.972269999999998,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":83198538,"defaultBranch":"master","name":"leetcode","ownerLogin":"JavaScriptor","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2017-02-26T09:52:46.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/14047812?v=4","public":true,"private":false,"isOrgOwned":true},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1613611559.0944939","canEdit":false,"refType":"branch","currentOid":"9f88e7c1397c2a8169a2c60af577971e7110cb15"},"path":"algorithms/cpp/fizzBuzz/FizzBuzz.cpp","currentUser":null,"blob":{"rawLines":["// Source : https://leetcode.com/problems/fizz-buzz/","// Author : Hao Chen","// Date : 2016-11-13","","/*************************************************************************************** "," *"," * Write a program that outputs the string representation of numbers from 1 to n."," * "," * But for multiples of three it should output “Fizz” instead of the number and for the "," * multiples of five output “Buzz”. For numbers which are multiples of both three and "," * five output “FizzBuzz”."," * "," * Example:"," * "," * n = 15,"," * "," * Return:"," * ["," * \"1\","," * \"2\","," * \"Fizz\","," * \"4\","," * \"Buzz\","," * \"Fizz\","," * \"7\","," * \"8\","," * \"Fizz\","," * \"Buzz\","," * \"11\","," * \"Fizz\","," * \"13\","," * \"14\","," * \"FizzBuzz\""," * ]"," ***************************************************************************************/","","class Solution {","public:"," vector\u003cstring\u003e fizzBuzz_old_school_way(int n) {"," vector\u003cstring\u003e result;"," for (int i=1; i\u003c=n; i++) {"," if ( i%3 == 0 \u0026\u0026 i%5 ==0 ) {"," result.push_back(\"FizzBuzz\");"," }else if (i%3 == 0) {"," result.push_back(\"Fizz\");"," }else if (i%5 == 0) {"," result.push_back(\"Buzz\");"," }else{"," result.push_back(std::to_string(i));"," }"," }"," return result;"," }"," "," "," class FizzBuzz {"," public:"," FizzBuzz() : x(0) {}"," "," string operator()() {"," x++; "," if ( x%3 == 0 \u0026\u0026 x%5 ==0 ) {"," return (\"FizzBuzz\");"," }else if (x%3 == 0) {"," return (\"Fizz\");"," }else if (x%5 == 0) {"," return(\"Buzz\");"," }"," return std::to_string(x);"," }"," "," private:"," int x;"," };"," "," vector\u003cstring\u003e fizzBuzz_cpp_way(int n) {"," vector\u003cstring\u003e result(n);"," generate(result.begin(), result.end(), FizzBuzz());"," return result;"," }"," "," vector\u003cstring\u003e fizzBuzz(int n) {"," "," //both method has same performance"," "," if (rand() % 2 == 0) {"," return fizzBuzz_cpp_way(n); "," }"," return fizzBuzz_old_school_way(n); "," }","};"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/JavaScriptor/leetcode/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"FizzBuzz.cpp","displayUrl":"https://github.com/JavaScriptor/leetcode/blob/master/algorithms/cpp/fizzBuzz/FizzBuzz.cpp?raw=true","headerInfo":{"blobSize":"2.23 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"f4ec548","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptor%2Fleetcode%2Fblob%2Fmaster%2Falgorithms%2Fcpp%2FfizzBuzz%2FFizzBuzz.cpp","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"91","truncatedSloc":"81"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"C++","languageID":43,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/JavaScriptor/leetcode/blob/master/algorithms/cpp/fizzBuzz/FizzBuzz.cpp","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/JavaScriptor/leetcode/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/JavaScriptor/leetcode/raw/refs/heads/master/algorithms/cpp/fizzBuzz/FizzBuzz.cpp","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":null},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/JavaScriptor/leetcode/branches":{"post":"YD6t2It3fiBx1eIHuiO9fE2gNQrLSuKz9zLeN1l2zh0sPzmktadm8iHewjIquHRqSz7faAE72xjifCtpyitMeg"},"/repos/preferences":{"post":"-Lh6bYgE6osbZHZlQ_Jg5dXQCHgvPBPJRWaPTK5oeq3_7kCFD3bwVuzzu377KG0sI7OSWpmyo4_glYHncoO4Dg"}}},"title":"leetcode/algorithms/cpp/fizzBuzz/FizzBuzz.cpp at master · JavaScriptor/leetcode","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}