Skip to content

Here are the Solutions of the POTD & other problems in GFG

License

Notifications You must be signed in to change notification settings

apu52/GFG-Daily-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GFG-Daily-Solutions

Here Are the Solutions of the POTD & other problems in GFG

Day 1(14 JAN) : Find duplicate rows in a binary matrix

Day 2(15 JAN) : Grinding Geek

Day 3(16 JAN) : Sequence of Sequence

Day 4(17 JAN) : All Unique Permutations of an array

Day 5(18 JAN) : Water the plants

Day 6(19 JAN) : Top k numbers in a stream

Day 7(20 JAN) : Distribute candies in a binary tree

Day 8(21 JAN) : Vertex Cover

Day 9(22 JAN) : Paths from root with a specified sum

Day 10(23 JAN) : Course Schedule

Day 11(24 JAN) : Check if a given graph is tree or not

Day 12(25 JAN) : Shortest Prime Path

Day 13(26 JAN) : Fractional Knapsack

Day 14(27 JAN) : Brackets in Matrix Chain Multiplication

Day 15(28 JAN) : Geekina Hate 1s

Day 16(29 JAN) : Count digit groupings of a number

Day 17(30 JAN) : LCS of three strings

Day 18(31 JAN) : Insert and Search in a Trie

Day 19(1 FEB) : Panagram Checking

Day 20(2 FEB) : Implement Atoi

Day 21(3 FEB) : Decimal Equivalent of Binary Linked List

Day 22(4 FEB) : Subtraction in Linked List

Day 23(5 FEB) : Sorted insert for circular linked list

Day 24(6 FEB) : Node at distance

Day 25(7 FEB) : Min distance between two given nodes of a Binary Tree

Day 26(8 FEB) : Check if all leaves are at same level

Day 27(9 FEB) : Check for Children Sum Property in a Binary Tree

Day 28(10 FEB) : Number of paths in a matrix with k coins

Day 29(11 FEB) : Recamans sequence

Day 30(12 FEB) : Recursive sequence

Day 31(13 FEB) : Clone an Undirected Graph

Day 32(14 FEB) : Find all Critical Connections in the Graph

Day 33(15 FEB) : Count all Possible Path

Day 34(16 FEB) : Flatten BST to sorted list

Day 35(17 FEB) : Does array represent Heap

Day 36(18 FEB) : Sum of leaf nodes in BST

Day 37(19 FEB) : Game with String

Day 38(20 FEB) : Word Break

Day 39(21 FEB) : Boolean Parenthesization

Day 40(22 FEB) : Distinct occurrences

Day 41(23 FEB) : Buy and Sell a Share at most twice

Day 42(24 FEB) : Maximum Sum Problem

Day 43(25 FEB) : Reach a given score

Day 44(26 FEB) : Power Set

Day 45(27 FEB) : Play With OR

Day 46(28 FEB) : Check if a number is divisible by 8

Day 47(29 FEB) : Sum of bit differences

Day 48(03 MAR) : Largest Number formed from an Array

Day 49(04 MAR) : Swap the array elements

Day 50(05 MAR) : Maximum Index

Day 51(06 MAR) : Search Pattern (Rabin-Karp Algorithm)

Day 52(07 MAR) : Longest repeating and non-overlapping substring

Day 53(08 MAR) : Check if frequencies can be equal

Day 54(09 MAR) : Find the N-th character

Day 55(10 MAR) : Remove all duplicates from a given string

Day 56(11 MAR) : Count pairs Sum in matrices

Day 57(12 MAR) : Generalised Fibonacci numbers

Day 58(13 MAR) : Print matrix in diagonal pattern

Day 59(14 MAR) : Largest subsquare surrounded by X

Day 60(15 MAR) : Linked List that is Sorted Alternatingly

Day 61(16 MAR) : Delete without head pointer

Day 62(17 MAR) : Count Pairs whose sum is equal to X

Day 63(18 MAR) : Level order traversal

Day 64(19 MAR) : Possible Paths in a Tree

Day 65(20 MAR) : Sum of nodes on the longest path from root to leaf node

Day 66(21 MAR) : ZigZag Tree Traversal

Day 67(22 MAR) : Diagonal sum in binary tree

Day 68(23 MAR) : Fibonacci series up to Nth term

Day 69(24 MAR) : Insert an Element at the Bottom of a Stack

Day 70(25 MAR) : Print N-bit binary numbers having more 1s than 0s

Day 71(26 MAR) : Additive sequence

Day 72(27 MAR) : Find shortest safe route in a matrix

Day 73(28 MAR) : City With the Smallest Number of Neighbors at a Threshold Distance

Day 74(29 MAR) : Euler Circuit in an Undirected Graph

Day 75(30 MAR) : Minimum element in BST

Day 76(31 MAR) : Closest Neighbour in BST

Day 77(1 APR) : Pairs violating the BST property

Day 78(2 APR) : Minimum Absolute Difference In BST

Day 79(3 APR) : Kth common ancestor in BST

Day 80(4 APR) : Sum of all substrings of a number

Day 81(5 APR) : Strictly Increasing Array

Day 82(6 APR) : Count ways to N'th Stair

Day 83(7 APR) : Maximize dot product

Day 84(8 APR) : Optimal Strategy For A Game

Day 85(9 APR) : Minimum Points To Reach Destination

Day 86(10 APR) : Party of Couples

Day 87(11 APR) : Gray to Binary equivalent

Day 88(12 APR) : Sum of Products

Day 89(13 APR) : Reverse Bits

Day 90(14 APR) : Xoring and Clearing

Day 91(15 APR) : Count the elements

Day 92(16 APR) : Minimize the Difference

Day 93(17 APR) : Count Pairs in an Array

Day 94(18 APR) : Smallest String Starting From Leaf

Day 95(19 APR) : Find missing in second array

Day 96(20 APR) : Union of Two Sorted Arrays

Day 97(21 APR) : Three way partitioning

Day 98(22 APR) : Row with minimum number of 1's

Day 99(23 APR) : Rohan's Love for Matrix

Day 100(24 APR) : Paths to reach origin

Day 101(25 APR) : Maximum sum of hour glass

Day 102(26 APR) : Exit Point in a Matrix

Day 103(27 APR) : Merge Sort on Doubly Linked List

Day 104(28 APR) : Delete Middle of Linked List

Day 105(29 APR) : Remove every kth node

Day 106(30 APR) : Add two numbers represented by linked lists

Day 107(1 MAY) : Arrange Consonants and Vowels

Day 108(2 MAY) : Serialize and deserialize a binary tree

Day 109(3 MAY) : K distance from root

Day 110(4 MAY) : Construct Binary Tree from Inorder and Postorder

Day 111(5 MAY) : Vertical sum

Day 112(6 MAY) : Print all nodes that don't have sibling

Day 113(7 MAY) : Reverse Level Order Traversal

Day 114(8 MAY) : Root to Leaf Paths

Day 115(9 MAY) : Divisor Game

Day 116(10 MAY) : Combination Sum II

Day 117(11 MAY) : Juggler Sequence

Day 118(12 MAY) : Minimum steps to destination

Day 119(13 MAY) : Number of Good Components

Day 120(14 MAY) : Path With Minimum Effort

Day 121(15 MAY) : Account Merge

Day 122(16 MAY) : Divisibility tree

Day 123(17 MAY) : Find Pair Given Difference

Day 124(18 MAY) : Find the Highest number

Day 125(19 MAY) : Find the closest number

Day 126(20 MAY) : Modular Exponentiation for large numbers

Day 127(21 MAY) : K closest elements

Day 128(22 MAY) : Minimize Max Distance to Gas Station

Day 129(23 MAY) : K-Palindrome

Day 130(24 MAY) : Partitions with Given Difference

Day 131(25 MAY) : You and your books

Day 132(26 MAY) : Minimum Cost To Make Two Strings Identical

Day 133(27 MAY) : Longest subsequence-1

Day 134(28 MAY) : Minimum cost to fill given weight in a bag

Day 135(29 MAY) : Geek and its Game of Coins

Day 136(30 MAY) : String Subsequence

Day 137(31 MAY) : Swap two nibbles in a byte

Day 138(1 JUN) : Odd Even Problem

Day 139(2 JUN) : Construct list using given q XOR queries

Day 140(3 JUN) : Trail of ones

Day 141(4 JUN) : Binary representation of next number

Day 142(5 JUN) : Swapping pairs make sum equal

Day 143(6 JUN) : Max sum in the configuration

Day 144(7 JUN) : Maximum occured integer

Day 145(8 JUN) : Index of an Extra Element

Day 146(9 JUN) : Convert array into Zig-Zag fashion

Day 147(10 JUN) : Nuts and Bolts Problem

Day 148(11 JUN) : Maximum Tip Calculator

Day 149(12 JUN) : Count numbers containing 4

Day 150(13 JUN) : Padovan Sequence

Day 151(14 JUN) : Armstrong Numbers

Day 152(15 JUN) : Mobile numeric keypad

Day 153(16 JUN) : Prime Pair with Target Sum

Day 154(18 JUN) : Number of Rectangles in a Circle

Day 155(19 JUN) : Find maximum volume of a cuboid

Day 156(20 JUN) : Integral Points Inside Triangle

Day 157(21 JUN) : Compare two fractions

Day 158(22 JUN) : Extract the Number from the String

Day 159(23 JUN) : Print Bracket Number

Day 160(24 JUN) : Summed Matrix

Day 161(25 JUN) : Left Rotate Matrix K times

Day 162(26 JUN) : Coverage of all Zeros in a Binary Matrix

Day 163(27 JUN) : Toeplitz matrix

Day 164(28 JUN) : The Palindrome Pattern

Day 165(1 JUL) : Make Binary Tree From Linked List

Day 166(2 JUL) : Linked list of strings forms a palindrome

Day 167(3 JUL) : Remove all occurences of duplicates in a linked list

Day 168(4 JUL) : Duplicate Subtrees

Day 169(5 JUL) : Vertical Width of a Binary Tree

Day 170(6 JUL) : Populate Inorder Successor for all nodes