## [f]izzbuzzer

### Looking for good programming challenges?

Use the search below to find our solutions for selected questions!

# All posts in Algorithms

### Pascal Triangle

Problem StatementThe figure below illustrates the first five rows of a graphic that is known as Pascal’s triangle. Each entry in each row before the last one is adjacent to one or two numbers in the lower row. It is a fact that each entry holds the sum of the . . . Read more

### Target Sum

Problem Statement You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and – as its new symbol. Find out how many ways to assign symbols to . . . Read more

### Number of Dice Rolls With Target Sum

Problem Statement You have d dice, and each die has f faces numbered 1, 2, …, f. Return the number of possible ways (out of fd total ways) modulo 10^9 + 7 to roll the dice so the sum of the face up numbers equals target. Example 1 Input: d . . . Read more

### Coin Change

Problem Statement You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return . . . Read more

### Set Matrix Zeroes

Problem Statement Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: [ [1,0,1], [0,0,0], [1,0,1] ] Solution We will use the first cell of every row and column . . . Read more

### Partition List

Problem Statment Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. Example Input: head = 1->4->3->2->5->2, x . . . Read more

### Implement strStr()

Problem Statement Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Input: haystack = “hello”, needle = “ll” Output: 2 Solution

### Remove Element

Problem Statement Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. The order of elements can be . . . Read more

### Remove Duplicates from Sorted Array

Problem StatementGiven a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. Given nums = [0,0,1,1,1,2,2,3,3,4], Your function . . . Read more
{"ft_lang_label":"__label__en","ft_lang_prob":0.81973,"math_prob":0.9663275,"size":2813,"snap":"2020-34-2020-40","text_gpt3_token_len":701,"char_repetition_ratio":0.14061944,"word_repetition_ratio":0.14933838,"special_character_ratio":0.26626378,"punctuation_ratio":0.164297,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95077896,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-29T00:26:50Z\",\"WARC-Record-ID\":\"<urn:uuid:6cbe2a90-42e2-49d6-a3cf-b1813efa9801>\",\"Content-Length\":\"40984\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4fbacd52-84b4-43bd-8fb1-195278d361cb>\",\"WARC-Concurrent-To\":\"<urn:uuid:67744eb1-ce00-4189-a90f-1111342f782b>\",\"WARC-IP-Address\":\"35.158.16.195\",\"WARC-Target-URI\":\"https://fizzbuzzer.com/category/algorithms/page/2/\",\"WARC-Payload-Digest\":\"sha1:DSR544HNGV3FGB625Y3TBIS6DZ4PTJZT\",\"WARC-Block-Digest\":\"sha1:DIBUXB563AYXYQXWGEZGFOCUFDMGRSDQ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600401617641.86_warc_CC-MAIN-20200928234043-20200929024043-00346.warc.gz\"}"}