100_Days_Code_Challenge icon indicating copy to clipboard operation
100_Days_Code_Challenge copied to clipboard

100 Days of Code Challenge in Python

    Problem 1: Program to display Fibonacci Series.

    Input: How Many Terms do you want to Display: 10
    Output: 0 1 1 2 3 5 8 13 21 34

    Problem 2: Program to find Factorial of number.

    Input: Enter a Number: 5
    Output: 5! = 120

    Problem 3: Program to find HCF of numbers.

    Input: Enter 1st Number: 5
            Enter 2nd Number: 12
    Output: HCF: 1

    Problem 4: Program to find LCM of numbers.

    Input: Enter 1st Number: 5
            Enter 2nd Number: 12
    Output: LCM: 1

    Problem 5: Program to check whether given number is Fibonacci or not.

    Input: Enter a Number: 78
    Output: It's not an Fibonacci Number
    
    Input: Enter a Number: 55
    Output: Yup! It's a Fibinacci Number

    Problem 1: Program to Check whether numbers is Armstrong or not.

    Input: Enter a Number: 189
    Output: No, It's not an Armstrong Number
    
    Input: Enter a Number: 153
    Output: It's an Armstrong Number

    Problem 2: Program for Array Rotation.

    Input: [ 5, 6, 7, 8, 1, 11, 15, 16], N = 4
    Output: [1, 11, 15, 16, 5, 6, 7, 8]

    Problem 3: Program for Maximum and Minimum elements in a list.

    Input: [5, 7, 9, 4, 6, 23, 11, 12]
    Output: Max: 23, MIN: 4

    Problem 4: Program to check whether number is Palindrome or not.

    Input: Enter a Number: 121
    Output: Palindrome Number
       
    Input: Enter a Number: 123
    Output: Not a Palindrome Number

    Problem 5: Program to check Prime Number using Sieve of Eratosthenes.

    Input: Upto How Many Terms: 20
    Output: 2 3 5 7 11 13 17 19

    Problem 1: Program to check whether list is Monotonic or not.

    Input: [5, 6, 7, 9, 1, 10, 25, 31]
    Output: No, It's not an Monotonic List
    
    Input: [1, 2, 3, 4, 5, 6, 7, 8]
    Output: Yup, It's an Monotonic List

    Problem 2: Program for Reversing a list.

    Input: [7, 4, 5, 6, 7, 8, 9, 1]
    Output: [1, 9, 8, 7, 6, 5, 4, 7]

    Problem 3: Program for Searching elements in a list.

    Input: [7, 6, 5, 3, 2, 6, 5, 10], N = 6
    Output: Present 

    Problem 4: Program for Second Largest element in a list.

    Input: [7, 6, 5, 3, 2, 6, 5, 10]
    Output: Second Largest Element is: 7

    Problem 5: Program to Swap first element with last element in a list.

    Input: [10, 5, 2, 6, 3, 7, 9, 4]
    Output: [4, 5, 2, 6, 3, 7, 9, 10]

    Problem 1: Program for Cloning/Copying the list.

    Input: [4, 5, 7, 8, 9, 6, 10, 15]
    Output: [4, 5, 7, 8, 9, 6, 10, 15]

    Problem 2: Program for N Largest elements in a list.

    Input: [4, 5, 7, 8, 9, 6, 10, 15]
    Output: [15, 10, 9, 8]

    Problem 3: Program for Occurrences of elements.

    Input: [14, 25, 16, 23, 10, 5, 6, 8, 7, 9, 10, 25, 14], N = 14
    Output: 14 Occurs 2 times

    Problem 4: Program for Removing Empty list.

    Input: [5, 6, [], 7, 8, 9, [], 12, [], 4,[]]
    Output: [5, 6, 7, 8, 9, 12, 4]

    Problem 5: Program for Removing Multiple Elements.

    Input: [1, 2, 3, 4, 5], N = [2, 4]
    Output: [1, 3, 5]

    Problem 1: Program to Break list into Chunks of list.

    Input: [10, 45, 20, 62, 47, 85, 12, 63, 24, 78, 10], N = 2
    Output: [[45, 20], [62, 47], [85, 12], [63, 24], [78, 10]]

    Problem 2: Program for Cumulative Sum of list.

        Input: [10, 20, 30, 40, 50, 60]
        Output: [10, 30, 60, 100, 150, 210]
    

      Problem 3: Program to print Duplicates in list.

        Input: [4, 5, 1, 2, 6, 5, 2]
        Output: [5, 2]
    

      Problem 4: Program for Flattening a list.

        Input: [1, 2, [3, 4, [5, 6], 7], [[[8, 9], 10]], [11, [12, 13]]]
        Output: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
    

      Problem 1: Program for Increamenting Numeric String.

        Input: ["100", "Days", "of", "CodeChallenge", "234", "is", "98", "123", "best", "4"], N = 10
        Output: ['110', 'Days', 'of', 'CodeChallenge', '244', 'is', '108', '133', 'best', '14']
    

      Problem 2: Program to find Maximum of each key in list.

        Input: [{"Days": 8, "Code": 1, "Challenge": 9}, {
                 "Days": 2, "Code": 9, "Challenge": 1}, {"Days": 5, "Code": 10, "Challenge": 7}]
        Output: {'Days': 8, 'Code': 10, 'Challenge': 9}
    

      Problem 3: Program to Sort list_1 by list_2.

        Input: ["a", "b", "c", "d", "e", "f", "g", "h", "i"], [0,   1,   1,    0,   1,   2,   2,   0,   1]
        Output: ['a', 'd', 'h', 'b', 'c', 'e', 'i', 'f', 'g']
    

      Problem 4: Program for Words Reverse Pairs in list.

        Input: ["skeeg", "best", "tseb", "for", "skeeg", "skeeg", "best", "geeks", "tseb"]
        Output: 3 Reverse Pairs
    

      Problem 1: Program to Remove Row with custom elements.

        Input: Test_list = [[5, 3, 1], [7, 8, 9], [1, 10, 22], [12, 18, 21]], N = [3, 10, 19, 29, 20, 15]
        Output: [[7, 8, 9], [12, 18, 21]]
    

      Problem 2: Program for Removing Specific Digit from every element.

        Input: [343, 893, 1948, 3433333, 2346], N = 3
        Output: ['4', '89', '1948', '4', '246']
    

      Problem 3: Program to print strings Based on Prefix.

        Input: Test_list = ["geeks", "peeks", "meeks", "leeks", "mean"], Prefix_list = ["ge", "ne", "me", "re"]
        Output: ['geeks', 'meeks', 'mean']
    

      Problem 4: Program to Swap ith with jth element.

        Input: Test_list = [4, 7, 8, 0, 8, 4, 2, 9, 4, 8, 4], i, j = 4, 8
        Output: [8, 7, 4, 0, 4, 8, 2, 9, 8, 4, 8]
    

      Problem 1: Program for elements Mutiple of elements in a list.

        Input: Test_list = [4, 24, 8, 10, 12, 23], Check_list = [6, 4]
        Output: [24, 12]
    

      Problem 2: Program to print element with Maximum Vowel in a list.

        Input: ["gfg", "beaeioust", "for", "geeks"]
        Output: beaeioust
    

      Problem 3: Program for Occurrences of i before first j in a list.

        Input: Test_list = [4, 5, 6, 4, 1, 4, 8, 5, 4, 3, 4, 9], i, j = 4, 8
        Output: 4 Occurs 3 times before 8 Occur
    

      Problem 4: Program to Sort Row by frequency of key.

        Input: [[10, 2, 3, 2, 3], [5, 5, 4, 7, 7, 4], [1, 2], [1, 1, 2, 2, 2]], n = 2
        Output: [[5, 5, 4, 7, 7, 4], [1, 2], [10, 2, 3, 2, 3], [1, 1, 2, 2, 2]]
    

      Problem 1: Program to Add Two Matrix.

        Input: X = [[1, 2, 3],
        		[4, 5, 6],
         		[7, 8, 9]]
    
    	    Y = [[9, 8, 7],
        		[6, 5, 4],
         		[3, 2, 1]]
        Output: [10, 10, 10, 10, 10, 10, 10, 10, 10]
    

      Problem 2: Program to Multiply Two Matrix.

        Input: A = [[12, 7, 3], [4, 5, 6], [7, 8, 9]], B = [[5, 8, 1, 2], [6, 7, 3, 0], [4, 5, 9, 1]]
        Output: [[114, 160, 60, 27], [74, 97, 73, 14], [119, 157, 112, 23]]
    

      Problem 3: Program for Product of all elements in Matrix.

        Input: [[1, 4, 5], [7, 3], [4], [46, 7, 3]]
        Output: 1622880
    

      Problem 4: Program to Transpose a Matrix.

        Input: [[12, 7], [4, 5], [3, 8]]
        Output: [12, 4, 3]
    	     [7, 5, 8]
    

      Problem 1: Program for Kth Element in Matrix.

        Input: Test_list = [[4, 5, 6],
                            [8, 1, 10],
                 	        [7, 12, 5]]
                K = 2
        Output: [5, 1, 12]
    

      Problem 1: Program for String Palindrome.

        Input: amma
        Output: Palindrome String
        
        Input: code
        Output: Not a Palindrome String
    

      Problem 1: Program to check whether string is Symmetric or Palindrome.

        Input: amam
        Output: Symmetric and Not Palindrome
        
        Input: amaama
        Output: Symmetric and Palindrome
    

      Problem 1: Program for Vertical Concatenation of Matrix.

        Input: [["Gfg", "good"], ["is", "for"], ["Best"]]
        Output: ['GfgisBest', 'goodfor', '']
    

      Problem 1: Program to Remove Duplicates from a List.

        Input: [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6]
        Output: [1, 2, 3, 4, 5, 6]
    

      Problem 2: Program to Remove Particular Character.

        Input: Hey! There satyam here, K = !
        Output: Hey There satyam here
    

      Problem 3: Program to Reverse Words of string.

        Input: 100 Days of Code Challenge
        Output: Challenge Code of Days 100
    

      Problem 4: Program to Convert Snake Case to Pascal case.

        Input: 100 days of code challenge
        Output: 100DaysOfCodeChallenge
    

      Problem 5: Program to Find word with Maximum Frequency.

        Input: hey you yeah you where are you
        Output: you
    

      Problem 1: Program for Even length String.

        Input: 100 Days of Code Challenge
        Output: Days, of, Code
    

      Problem 2: Program for least Frequency Character.

        Input: this is github challenge
        Output: u
    

      Problem 3: Program for Matching Characters in string.

        Input: F1 = 100 Days of Code Challenge, F2 = Code Challenge
        Output: Code Challenge
    

      Problem 4: Program to print String with Vowels.

        Input: Github Challenge
        Output: Not Accepted
        
        Input: aaoaao
        Output: Accepted
    

      Problem 1: Program for Removing ith Character from string.

        Input: Code Challenge, K = 6
        Output: Code Callenge
    

      Problem 2: Program for Special Characters in string.

        Input:  github@io
        Output: Not Accepted
        
        
        Input:  githubio
        Output: Accepted
    

      Problem 3: Program for checking string is Binary or not.

        Input: 123456
        Output: Not a Binary
        
        
        Input: 1011001011
        Output: Binary
    

      Problem 4: Program to print all the words greater than given length.

        Input: Hey! this is 100 Days of Code Challenge, N = 4
        Output: Challenge
    

      Problem 1: Program for PERMUTATION of string.

        Input: ABC
        Output: ABC, ACB, BAC, BCA, CAB, CBA
    

      Problem 2: Program for Replace Duplicate Occurrences in string.

        Input: Hey! this is 100 Days of Code Challenge, N = 4
        Output: Challenge
    

      Problem 3: Program for Replace Multiple Words in string.

        Input: Hey! this is 100 Days of Code Challenge, N = 4
        Output: Challenge
    

      Problem 4: Program to print Uncommon Words in strings.

        Input: Hey! this is 100 Days of Code Challenge, N = 4
        Output: Challenge
    

      Problem 1: Program for Executing a String of Code.

        Input: Test_string = """ 
    				def factorial(num): 
    				    fact=1 
    				    for i in range(1,num+1): 
    					fact = fact*i 
    				    return fact 
    				print(factorial(5)) 
    			  """
    	    N = 5
        Output: 120
    

      Problem 2: Program for checking URL in String.

        Input: "These are the links http://www.google.com  and http://stackoverflow.com/questions/839994/extracting-a-url-in-python"
        Output: http://www.google.com
    	     http://stackoverflow.com/questions/839994/extracting-a-url-in-python
    

      Problem 3: Program for String Slicing to Rotate a String.

        Input: Hey! There this is 100 Days of Code Challenge
        Output: Left Rotation:  There this is 100 Days of Code ChallengeHey!
    	     Right Rotation: engeHey! There this is 100 Days of Code Chall
    

      Problem 4: Program for String Slicing to check if a string can become empty by Recursive relation.

        Input: a = CoCodede, b = Code
        Output: True
    

      Problem 1: Program for Checking Strings for Specific Characters

        Input: Test_string = "@geeksfor#geeks123%^&*"
    	    Test_list = ['#', '%', '8', '@', ')']
        Output: [True, True, False, True, False]
    

      Problem 2: Program for Duplicates Characters in string.

        Input: hey this is Github Repo
        Output: hey tis
    

      Problem 3: Program to Sort a list of names using Last Names.

        Input: ['John Wick', 'Jason Voorhees', 'Freddy Krueger', 'Keyser Soze', 'Mohinder Singh Pandher']
        Output: ['Freddy Krueger', 'Mohinder Singh Pandher', 'Keyser Soze', 'Jason Voorhees', 'John Wick']
    

      Problem 4: Program to find letters which are not common in two strings.

        Input: 1st String: Hey this is Code Challenge
    	    2nd String: wait this is Github Repo
        Output: C R p u d n G l g y H b w
    

      Problem 1: Program for Maximum UpperCase run.

        Input: GeEKSforGEEKSISBESt
        Output: GEEKSISBES 10
    

      Problem 2: Program for Moving Numbers to the end of the string.

        Input: This is 100 Days of Code Challenge Plus 50 Days Also
        Output: This is  Days of Code Challenge Plus  Days Also10050
    

      Problem 3: Program for Replacing String with Sub-String.

        Input: String: This is 50 Days of Code Challenge
    	    Which: 50
    	    To: 100
        Output: This is 100 Days of Code Challenge
    

      Problem 4: Program to print strings based on Prefix.

        Input: Test_list = ["geeks", "peeks", "meeks", "leeks", "mean"]
    	    Pref_list = ["ge", "ne", "me", "re"]
        Output: geeks meeks mean
    

      Problem 1: Extracting Values from Dictionary.

        Input: Test_dict = {'Challenges': [5, 6, 7, 8],
                 		 'are': [10, 11, 7, 5],
                             'best': [6, 12, 10, 8],
                             'for': [1, 2, 5]}
        Output: [1, 2, 5, 6, 7, 8, 10, 11, 12]
    

      Problem 2: Remove a Key from Dictionary.

        Input: {'This': 12, 'is': 24, 'Code': 36, 'Challenge': 48, 'Github': 60}
    	    Which Key to Delete: Github
        Output: {'This': 12, 'is': 24, 'Code': 36, 'Challenge': 48}
    

      Problem 3: Sort a list of Dictionaries by values using itemgetter.

        Input: Test_list = [{"Name": "Tushar", "Age": 20},
                		 {"Name": "Aditya", "Age": 19},
                		 {"Name": "Satyam", "Age": 21}]
        Output: Age Sorting: [{'Name': 'Aditya', 'Age': 19}, {'Name': 'Tushar', 'Age': 20}, {'Name': 'Satyam', 'Age': 21}]
    	     Name and Age Sorting: [{'Name': 'Aditya', 'Age': 19}, {'Name': 'Tushar', 'Age': 20}, {'Name': 'Satyam', 'Age': 21}]
    

      Problem 4: Find the Sum of all items in a Dictionary.

        Input: {'a': 100, 'b': 200, 'c': 300, 'd': 400}
        Output: Total Sum: 1000
    

      Problem 1: Program to check Order of Characters in string.

        Input: Enter String: CodeChallenge
    	    Enter Pattern: Co
        Output: True
        
        Input: Enter String: CodeChallenge
    	    Enter Pattern: oC
        Output: False
    

      Problem 2: Program to Convert Key-Values list to flat Dictionary.

        Input: Test_dict = {'Month': [1, 2, 3],
                 		 'Name': ['Jan', 'Feb', 'March']}
        Output: Total Sum: {1: 'Jan', 2: 'Feb', 3: 'March'}
    

      Problem 3: Program for Merging Two Dictionaries.

        Input: Test_dict_1 = {'A': 10, 'B': 8}
    	    Test_dict_2 = {'D': 6, 'C': 4}
        Output: {'A': 10, 'B': 8, 'D': 6, 'C': 4}
    

      Problem 4: Program to Sort list of Dictionaries using lambda function.

        Input: Test_list = [{"Name": "Satyam", "Age": 20},
                 {"Name": "Aditya", "Age": 20},
                 {"Name": "Tushar", "Age": 19}]
        Output: [{'Name': 'Tushar', 'Age': 19}, {'Name': 'Satyam', 'Age': 20}, {'Name': 'Aditya', 'Age': 20}]
    

      Problem 1: Program to Append Dictionary Keys and Values.

        Input: {"Code": 1, "Challenge": 10, "is": 100, "Best": 1000}
        Output: ['Code', 'Challenge', 'is', 'Best', 1, 10, 100, 1000]
    

      Problem 2: Program for Counter in Python to find the Winner of the Election.

        Input: Test_list = ['john', 'johnny', 'jackie', 'johnny', 'john', 'jackie',
                 		 'jamie', 'jamie', 'john', 'johnny', 'jamie', 'johnny', 'john']
        Output: john
    

      Problem 3: Program to Sort Dictionary Keys and Values List.

        Input: {'Code': [7, 6, 3], 'Challenge': [2, 10, 3], 'is': [19, 4], 'Best': [18, 20, 7]}
        Output: {'Best': [7, 18, 20], 'Challenge': [2, 3, 10], 'Code': [3, 6, 7], 'is': [4, 19]}
    

      Problem 4: Program to Sort Python Dictionaries by Keys and Values.

        Input: {2: 56, 1: 2, 5: 12, 4: 24, 6: 18, 3: 323}
        Output: Sorting by Keys: {1: 2, 2: 56, 3: 323, 4: 24, 5: 12, 6: 18}
    	     Sorting by Values: {1: 2, 5: 12, 6: 18, 4: 24, 2: 56, 3: 323}
    

      Problem 1: Program to print Anagram together in Python using list and Dictionaries.

        Input: ['cat', 'dog', 'tac', 'god', 'act']
        Output: cat tac act dog god
    

      Problem 2: Program to check if Binary Representations of two numbers are Anagram.

        Input: 8, 4
        Output: True, because both have same number of 0's and 1's
    

      Problem 3: Program for Handling missing keys in Python Dictionaries.

        Input: {'a': 1, 'b': 2}), key = d
        Output: Key not found...
    

      Problem 4: Program for K’th Non-repeating Character in Python using OrderedDict.

        Input: CodeChallenge, K = 2
        Output: d, because ['o', 'd', 'h', 'a', 'n', 'g'] ---> This is the list of Non-Repeating Characters in the Given String
    

      Problem 1: Program for counting the frequencies of elements.

        Input: [1, 1, 1, 5, 5, 3, 1, 3, 3, 1, 4, 4, 4, 2, 2, 2, 2]
        Output: 1 : 5, 5 : 2, 3 : 3, 4 : 3, 2 : 4
    

      Problem 2: Program to Convert any string to a string contains it's Mirror Characters.

        Input: codechallenge, K = 4
        Output: codvxszoovmtv
    

      Problem 3: Program to Remove all Duplicate words from a given sentence.

        Input: Coding is great and challenges is great
        Output: Coding is great and challenges
    

      Problem 4: Program to find the size of largest subset of anagram words.

        Input: magenta magnate tan gnamate
        Output: 3
    

      Problem 1: Program for Dictionary Intersection in Python.

        Input: s1 = ABHISHEKsinGH
                s2 = gfhfBHkooIHnfndSHEKsiAnG
        Output: Possible
        
        Input: s1 = Hello
                s2 = dnaKfhelddf
        Output: Not Possible
        
        Input: s1 = GeeksforGeeks
                s2 = rteksfoGrdsskGeggehes
        Output: Possible
    

      Problem 2: Program to check if Frequency of characters in string can become same after removing atmost one character.

        Input: xxxyyzz
        Output: True
        
        Input: xxxxyyzz
        Output: False
    

      Problem 3: Program for Keys associated with Values in Dictionary.

        Input: {'Code': [1, 2, 3], "Challenge": [3, 4, 5], 'is': [1, 4], 'best': [4, 2]}
        Output: {1: ['Code', 'is'], 2: ['Code', 'best'], 3: ['Code', 'Challenge'], 4: ['Challenge', 'is', 'best'], 5: ['Challenge']}
    

      Problem 4: Program for Possible Words using Given Characters.

        Input: Test_list = ['go', 'bat', 'me', 'eat', 'goal', 'boy', 'run']
        	    Test_chars = ['e', 'o', 'b', 'a', 'm', 'g', 'l']
        Output: go, me, goal
    

      Problem 1: Program for Assigning keys with Maximum Element Index.

        Input: {"Challenges": [5, 3, 6, 3], "are": [1, 7, 5, 3], "Best": [9, 1, 3, 5]}
        Output: {'Challenges': 2, 'are': 1, 'Best': 0}
    

      Problem 2: Program for Index Directory of Elements.

        Input: [7, 6, 3, 7, 8, 3, 6, 7, 8]
        Output: {8: [4, 8], 3: [2, 5], 6: [1, 6], 7: [0, 3, 7]}
    

      Problem 3: Program for Minimum Value Key Assignment.

        Input: Test_dict_1 = {"Code": 1, "Challenge": 7, "is": 8, "Best": 10}
    	    Test_dict_2 = {"Code": 5, "Challenge": 5, "is": 7, "Best": 14}
    	    
        Output: {'Code': 1, 'Challenge': 5, 'is': 7, 'Best': 10}
    

      Problem 4: Program for Shuffling Dictionary Values.

        Input: {"Code": 1, "Challenge": 7, "is": 8, "Best": 10}
        Output: {'Code': 10, 'Challenge': 8, 'is': 1, 'Best': 7}
    

      Problem 1: Program to display keys with same values in a dictionary List.

        Input: {'S': 2, 'a': 3, 'm': 1, 't': 4, 'y': 1, 'y': 4, 't': 3}
        Output: ['S', 'S', 'a', 'a', 'a', 'm', 't', 't', 't', 'y', 'y', 'y', 'y']
    

      Problem 2: Filter dictionaries by values in Kth Key in list.

        Input: Test_list = [{"Gfg": 3, "is": 5, "best": 10},
                		 {"Gfg": 5, "is": 1, "best": 1},
                 		 {"Gfg": 8, "is": 3, "best": 9},
                 		 {"Gfg": 9, "is": 9, "best": 8},
                 		 {"Gfg": 4, "is": 10, "best": 7}]
    			 
        Output: [{'Gfg': 5, 'is': 1, 'best': 1}, {'Gfg': 8, 'is': 3, 'best': 9}, {'Gfg': 9, 'is': 9, 'best': 8}]
    

      Problem 3: Program to Remove Duplicity from a Dictionary.

        Input: {'All': ['All', 'Time', 'Favourite'], 'Favourite': ['All'], 'Code': ['Challenge']}
        Output: {'All': ['All', 'Time', 'Favourite'], 'Code': ['Challenge']}
    

      Problem 4: Program for Unique values count of each Key.

        Input: Test_dict = [{"Challenges": 1, "are": 3, "Best": 2}, {
                              "Challenges": 1, "are": 3, "Best": 6}, {"Challenges": 7, "are": 3, "Best": 10}]
    			  
        Output: {'Challenges': 2, 'are': 1, 'Best': 3}
    

      Problem 1: Program to convert each list element to Key-Value Pair.

        Input: [2323, 82, 129388, 234, 95]
        Output: {23: 23, 8: 2, 129: 388, 2: 34, 9: 5}
    

      Problem 2: Program to Resize keys in Dictionary.

        Input: {"geeksforgeeks": 3, "best": 3, "coding": 4, "practice": 3}, K = 2
        Output: {'ge': 3, 'be': 3, 'co': 4, 'pr': 3}
    

      Problem 3: Program for Rotating Dictionary by K.

        Input: {1: 6, 8: 1, 9: 3, 10: 8, 12: 6, 4: 9}, K = 2
        Output: {12: 6, 4: 9, 1: 6, 8: 1, 9: 3, 10: 8}
    

      Problem 4: Program to test if Values Sum is Greater than Keys Sum in Dictionary.

        Input: {5: 3, 1: 3, 10: 4, 7: 3, 8: 1, 9: 5}
        Output: False, because Sum of all the Values is less than sum of all the Keys.
    

      Problem 1: Program to Extract digits from Tuple list.

        Inpu: [(15, 3), (3, 9), (1, 10), (99, 2)]
        Output: [5, 9, 2, 1, 3, 0]
    

      Problem 2: Program to Join Tuples if similar initial element.

        Inpu: [(5, 6), (5, 7), (6, 8), (6, 10), (7, 13)]
        Output: [(5, 6, 7), (6, 8, 10), (7, 13)]
    

      Problem 3: Program for Maximum and Minimum K elements in Tuple.

        Inpu: (5, 20, 3, 7, 6, 8, 2, 87, 9, 14), K = 2
        Output: (2, 3, 20, 87)
    

      Problem 4: Program to Find the size of a Tuple.

        Inpu: Tuple_1 = ("A", 1, "B", 2, "C", 3)
    	    Tuple_2 = ("Geek1", "Satyam", "hey you yeah you", "Tushar", "Geek3", "Aditya")
    	    Tuple_3 = ((1, "Lion"), (2, "Tiger"), (3, "Fox"), (4, "Wolf"))
    	    
        Output: Size of Tuple_1: 44 bytes
    	     Size of Tuple_2: 44 bytes
    	     Size of Tuple_3: 36 bytes
    

      Problem 1: Program for Occurrences of Characters in string.

        Inpu: "ABBBBCCCCCCCCAB"
        Output: 1A4B8C1A1B
    

      Problem 2: Program for all pair combinations of 2 tuples.

        Inpu: (4, 5), (7, 8)
        Output: [(4, 7), (4, 8), (5, 7), (5, 8), (7, 4), (7, 5), (8, 4), (8, 5)]
    

      Problem 3: Program to Remove Tuples of Length K.

        Inpu: [(4, 5), (4, ), (8, 6, 7), (1, ), (3, 4, 6, 7)], K = 3
        Output: [(4, 5), (4,), (1,), (3, 4, 6, 7)]
    

      Problem 4: Program to Sort a list of tuples by second Item.

        Inpu: [('for', 24), ('is', 10), ('Geeks', 28), ('Geeksforgeeks', 5), ('portal', 20), ('a', 15)]
        Output: [('Geeksforgeeks', 5), ('is', 10), ('a', 15), ('portal', 20), ('for', 24), ('Geeks', 28)]
    

      Problem 1: Program for Inverted Number Pattern.

        1 2 3 4 5 6
        1 2 3 4 5
        1 2 3 4
        1 2 3
        1 2
        1
    

      Problem 2: Program for Inverted Star Pattern.

        * * * * * *
        * * * * *
        * * * *
        * * *
        * *
        *
    

      Problem 3: Program to generate the next 15 leap years starting from a given year.

          Input:  2000
          Output: [2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036, 2040, 2044, 2048, 2052, 2056]
    

      Problem 4: Write a python program to solve a classic ancient Chinese puzzle. We count 35 heads and 94 legs among the chickens and rabbits in a farm. How many rabbits and how many chickens do we have?

                      Sample Input		    Expected Output
                    heads-150 legs-400	      100 50
                    heads-3 legs-11		        No solution
                    heads-3 legs-12		        0 3
                    heads-5 legs-10		        5 0
    

      Problem 1: Program to Flatten tuple of list.

        Input:  ([5, 6], [6, 7, 8, 9], [3])
        Output: (5, 6, 6, 7, 8, 9, 3)
    

      Problem 2: Program to Convert Nested tuple to Custom Key Dictionary.

        Input:  ((4, 'Gfg', 10), (3, 'is', 8), (6, 'Best', 10)), ['key', 'value', 'id']
        Output: [{'key': 4, 'value': 'Gfg', 'id': 10}, {'key': 3, 'value': 'is', 'id': 8}, {'key': 6, 'value': 'Best', 'id': 10}]
    

      Problem 3: Program to arrange the tuple of list according to given order.

        Input:  [('Gfg', 3), ('best', 9), ('CS', 10), ('Geeks', 2)], ['Geeks', 'best', 'CS', 'Gfg']
        Output: [('Geeks', 2), ('best', 9), ('CS', 10), ('Gfg', 3)]
    

      Problem 4: Program to Remove Duplicate tuples from a list of tuples.

        Input:  [(4, 6), (1, 2), (9, 2), (2, 1), (5, 7), (6, 4), (9, 2)]
        Output: [(2, 9), (1, 2), (4, 6), (5, 7)]
    

      Problem 1: Program to Extract tuples having K digit elements.

       Input:  [(54, 2), (34, 55), (222, 23), (12, 45), (78, )], k = 2
       Output: [(34, 55), (12, 45), (78,)]
    

      Problem 2: Program to Remove None elements from Tuple.

       Input:  [(None, 2), (None, None), (3, 4), (12, 3), (None, )]
       Output: [(None, 2), (3, 4), (12, 3)]
    

      Problem 3: Program to Sort tuple by Total digits.

       Input:  [(3, 4, 6, 723), (1, 2), (12345,), (134, 234, 34)]
       Output: [(1, 2), (12345,), (3, 4, 6, 723), (134, 234, 34)]
    

      Problem 4: Program to Sort tuple by it's last element.

       Input:  [(1, 3), (3, 2), (2, 1)]
       Output: [(2, 1), (3, 2), (1, 3)] 
    

      Problem 1: Program to Sort Tuples by their Maximum element.

      Input:  [(4, 5, 5, 7), (1, 3, 7, 4), (19, 4, 5, 3), (1, 2)]
      Output: [(19, 4, 5, 3), (4, 5, 5, 7), (1, 3, 7, 4), (1, 2)]
    

      Problem 2: Program to find tuples which have all elements divisible by K from a list of tuples.

      Input:  [(6, 24, 12), (7, 9, 6), (12, 18, 21)], k = 3
      Output: [(6, 24, 12), (12, 18, 21)]
    

      Problem 1: Program for Binary Search.

      Input:  [2, 5, 4, 7, 8, 9, 10], n = 8
      Output: Found at index 4
    

      Problem 2: Program for Linear Search.

      Input:  [2, 5, 4, 7, 8, 9, 10], n = 8
      Output: Found at index 4
    

      Problem 1: Write a function to find the medical specialty visited by the maximum number of patients and return the name of the specialty.

    
    Fortis Hospital wants to know the medical specialty visited by the maximum number of patients. Assume that the Patient id
    of the patient along with the medical specialty visited by the patient is stored in a list. The details of the medical
    specialties are stored in a dictionary as follows:
    			
     { "P" : "Pediatrics", "O" : "Orthopedics", "E" : "ENT" }
    
    Write a function to find the medical specialty visited by the maximum number of patients and return 
    the name of the specialty.
          
    Note:  Assume that there is always only one medical specialty which is visited by maximum number of patients.
          
    				Sample Input		               	          Expected Output
    	[ 101, 'P', 102, 'O', 302, 'P', 305, 'P']				    Pediatrics
    	[ 101, 'O', 102, 'O', 302, 'P', 305, 'E', 401, 'O',656, 'O']		    Orthopedics
    	[ 101, 'P', 102, 'E', 302, 'P', 305, 'P', 401, 'E', 656, 'O', 987, 'E']	    ENT
    
    

      Problem 2: Write a python function translate() that accepts the bilingual dictionary and a list of English words (your Christmas wish) and returns a list of equivalent Swedish words.

     Represent a small bilingual (English-Swedish) glossary given below as a Python dictionary
          		
     d={"merry":"god", "christmas":"jul", "and":"och", "happy":"gott", "new":"nytt","year":"ar"} and use it to translate your
     
     Christmas wishes from English into Swedish. That is, write a python function translate() that accepts the bilingual
     
     dictionary and a list of English words (your Christmas wish) and returns a list of equivalent Swedish words.
     
        Input:  ["merry", "christmas"]
        Output: ['god', 'jul']
    

      Problem 1: Program for Insertion Sort.

      Input:  [5,14,6,23,15,12,34]
      Output: [5,6,12,14,15,23,34]
    

      Problem 2: Program for Recursive Insertion Sort.

      Input:  [5,14,6,23,15,12,34]
      Output: [5,6,12,14,15,23,34]
    

      Problem 1: Program for Quick Sort.

      Input:  [5,14,6,23,15,12,34]
      Output: [5,6,12,14,15,23,34]
    

      Problem 2: Write a program for to input name of the gems separated by comma and the respective quantities to be purchased separated by comma. Then print the total cost of the gems user want to purchase and also reduce the quantity of the gems purchased.

     Let we have two dictionaries.  
     gem_qty={“ruby” : 25,“diamond”: 30,“emrald”:15,“topaz”: 18,“sapphire”: 20}
     gem_price={“ruby” : 2000,“diamond”: 4000,“emrald”:1900,“topaz”:500,“sapphire”:2500}
     
         Input                           Output
     diamond,ruby,topaz            Total Cost: 47500
     5,10,15                       Gem_Qty: {'ruby': 15, 'diamond': 25, 'emrald': 15, 'topaz': 3, 'sapphire': 20}
    
    
    
    

      Problem 1: Program for Bubble Sort.

      Input:  [64, 25, 12, 22, 11]
      Output: [11, 12, 22, 25, 64]
    

      Problem 2: Program for Selection Sort.

      Input:  [64, 25, 12, 22, 11]
      Output: [11, 12, 22, 25, 64]
    

      Problem 1: Program for Inverted Star Pattern.

      Input:   6
      Output:  ******
    	    *****
                 ****
      	      ***
        	       **
        	        *
    

      Problem 2: Program for Merge Sort.

      Input:  [64, 25, 12, 22, 11]
      Output: [11, 12, 22, 25, 64]
       
    

      Problem 1: Program to get Current Time.

        Time: 19:29:53
    

      Problem 2: Program to get Current Date and Time.

        Time: 19:29:53
        Date: 13-02-2021
    

      Problem 1: Find Yesterday’s, Today’s and Tomorrow’s Date.

      Problem 2: Program to convert time from 12 hour to 24 hour format.

      
       Input : 11:28:33 PM
       Output: 23:28:33
    
       Input : 12:15:21 AM
       Output: 00:15:21
        
    

      Problem 1: Python program to find difference between current time and given time.

      Input : h1=7, m1=20, h2=9, m2=45
      Output: 2 : 25
    

      Problem 2: Convert date string to timestamp in Python.

      Input : "02/04/2021"
      Output: 1617301800.0
    

      Problem 1: Find number of times every day occurs in a Year.

      Input : 2021
      Output: Monday : 52
              Tuesday : 52
              Wednesday : 52
              Thursday : 52
              Friday : 53
              Saturday : 52
              Sunday : 52
    

      Problem 2: Convert timestamp string to datetime object in Python.

      Input : 1617301800
      Output: "02/04/2021"
    

      Problem 1: Python program to Count Uppercase, Lowercase, special character and numeric values using RegEx.

        Input: "ThisIsGeeksforGeeks!, 123" 
    
        Output: No. of uppercase characters = 4
    	    No. of lowercase characters = 15
    	    No. of numerical characters = 3
    	    No. of special characters = 2
    

      Problem 2: Python Program to Check if String Contain Only Defined Characters using RegEx.

        Input: ‘657’ let us say regular expression contain following characters - (‘78653’)
        Output: Valid
        Explanation: The Input string only consist of characters present in the given string.
    
        Input: ‘7606’ let us say regular expression contain following characters - (‘102’) 
        Output: Invalid
    

      Problem 1: Python RegEx to extract maximum numeric value from a string.

        Input: 100klh564abc365bg
        Output: 564
        Maximum numeric value among 100, 564, and 365 is 564.
    
        Input: abchsd0sdhs
        Output: 0
    

      Problem 2: Python Program to find the most occurring number in a string using RegEx.

        Input: geek55of55geeks4abc3dr2 
        Output: 55
    
        Input: abcd1def2high2bnasvd3vjhd44
        Output: 2
    

      Problem 1: Python Program to put spaces between words starting with capital letters using RegEx.

        Input: BruceWayneIsBatman
        Output: bruce wayne is batman
    
        Input: GeeksForGeeks
        Output: geeks for geeks
    

      Problem 2: Check whether a string starts and ends with the same character or not.

        Input: abba
        Output: Valid
    
        Input: a
        Output: Valid
    
        Input: abc
        Output: Invalid
    

      Problem 1: Python program to Remove duplicate words from Sentence.

        Input: str = “Good bye bye world world” 
        Output: Good bye world 
    
        Input: str = “Hello hello world world” 
        Output: Hello world 
    

      Problem 2: Python RegEx to find sequences of one upper case letter followed by lower case letters.

        Input: Geeks
        Output: Yes
    
        Input: geeksforgeeks
        Output: No
    

      Problem 1: Python RegEx to Remove all characters except letters and numbers.

        Input:  123abcjw:, .@! eiw
        Output: 123abcjweiw
    

      Problem 2: Program to accept string ending with alphanumeric character.

        Input: ankitrai326
        Output: Accept
    
        Input: ankirai@
        Output: Discard
    

      Problem 1: Python RegEx to accept string starting with vowel.

        Input: animal
        Output: Accepted
    
        Input: zebra
        Output: Not Accepted
    

      Problem 2: Program to check if a string starts with a substring using RegEx.

        Input: 
            String: "geeks for geeks makes learning fun" 
            Substring: "geeks" 
        Output: True 
        
        Input: 
            String: "geeks for geeks makes learning fun" 
            Substring: "makes" 
        Output: False
    

      Problem 1: Parsing and Processing URL using Python-RegEx.

        Input: https://www.geeksforgeeks.org/courses
        Output: 
        	Hostname: geeksforgeeks.com
            Protocol: https
    

      Problem 2: Check if an URL is valid or not using Validator Module.

        Input: “https://www.geeksforgeeks.org/” 
        Output: Yes 
    
        Input: “https:// www.geeksforgeeks.org/”
        Output: No 
    

      Problem 1: Program to find files having a particular extension using RegEx.

        Input: ["gfg.html", "geeks.xml", "computer.txt", "geeksforgeeks.jpg", "hey.png"], x = png
        Output: hey.png
    

      Problem 2: Check if email address valid or not.

        Input:  [email protected]
        Output: Valid Email
    
        Input: [email protected]
        Output: Valid Email
    
        Input: ankitrai326.com
        Output: Invalid Email 
    

      Problem 1: Program to check the validity of a Password.

        Primary conditions for password validation :
    
          1) Minimum 8 characters.
          2) The alphabets must be between [a-z]
          3) At least one alphabet should be of Upper Case [A-Z]
          4) At least 1 number or digit between [0-9].
          5) At least 1 character from [ _ or @ or $ ]
    
        Input: R@m@_f0rtu9e$
        Output: Valid Password
    
        Input: Rama_fortune$
        Output: Invalid Password
        Explanation: Number is missing
    
        Input: Rama#fortu9e 
        Output: Invalid Password
        Explanation: Must consist from _ or @ or $
    

      Problem 2: Categorize Password as Strong or Weak using RegEx.

    
        Conditions to be fulfilled are:
    
          1) Minimum 9 characters and maximum 20 characters.
          2) Cannot be a newline or a space
          3) There should not be three or more repeating characters in a row.
          4) The same string pattern(minimum of two character length) should not be repeating.
    
        Input1: Qggf!@ghf3
        Output1: Strong Password!
    
        Input2: aaabnil1gu
        Output2: Weak Password: Same character repeats three or more times in a row
    
        Input3: Geeksforgeeks
        Output3: Weak Password: Same character repeats three or more times in a row
    
        Input4: Aasd!feasnm
        Output4: Weak password: Same string pattern repetition
    
        Input5: 772*hdf77
        Output5: Weak password: Same string pattern repetition
    
        Input6: " "
        Output6: Password cannot be a newline or space!
    

      Problem 1: Program to check if a given positive integer is a power of 2.

        Input:  64
        Output: True(because 2^6 = 64)
        
        Input:  32
        Output: True(because 2^5 = 32)
        
        Input:  63
        Output: False
    

      Problem 2: Program to check if a given positive integer is a power of 3.

        Input:  27 
        Output: True(because 3^3 = 27)
        
        Input:  81 
        Output: True(because 3^4 = 81)
    
        Input:  21
        Output: False 
    

      Problem 1: Program to check if an integer is the power of another integer.

        Input: 16, 2
        Output: True
        
        Input: 12, 2
        Output: False
        
        Input: 81, 3
        Output: True
    

      Problem 2: Program to check if a number is a perfect square.

        Input:  8
        Output: False
        
        Input:  9
        Output: True
        
        Input:  100
        Output: True
    

      Problem 1: Program to find missing numbers from a list.

        Input: [1,2,3,4,6,7,10]
        Output: [5, 8, 9]                                          
        
        Input: [10,11,12,14,17]
        Output: [13, 15, 16]
    

      Problem 2: Program to find a missing number from a list.

        Input: [1,2,3,4,6,7,8]
        Output: 5
        
        Input:  [10,11,12,14,15,16,17]
        Output: 13
    

      Problem 1: Program to find three numbers from an array such that the sum of three numbers equal to zero.

        Input: [-1,0,1,2,-1,-4]
        Output: [[-1, -1, 2], [-1, 0, 1]]
        Note: Find the Unique Triplets in the array.
    

      Problem 2: Program to find three numbers from an array such that the sum of three numbers equal to a given number.

        Input: [1, 0, -1, 0, -2, 2], N = 0
        Output: [[-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]]
        Explanation: In the output list you can see that all the elements have the Sum = 0.
                     (-2) + (-1) + (1) + (2) = 0
    

      Problem 1: Program to add the digits of a positive integer repeatedly until the result has a single digit.

        Input: 48
        Output: 3
        For example given number is 48, the result will be 3.
            Step 1: 4 + 8 = 12
            Step 2: 1 + 2 = 3
    

      Problem 2: Program to find the single number in a list that doesn't occur twice.

        Input: [5, 3, 4, 3, 4]
        Output: 5
    

      Note:

      ^

              10 ^ 12
         	  10: 1010
         	  12: 1100
     	      0110 ---> 6
         
     	  Explanation: 1 ^ 0 -> 1, 0 ^ 1 -> 1, 1 ^ 1 = 0 
    

      &

              10 & 12
         	  10: 1010
         	  12: 1100
     	      1000 ---> 8
         
     	  Explanation: 1 & 0 -> 0, 0 & 1 -> 0, 1 & 1 = 1
    

      |

              10 | 12
         	  10: 1010
         	  12: 1100
     	      1110 ---> 14
         
     	  Explanation: 1 | 0 -> 1, 0 | 1 -> 1, 1 | 1 = 1
    

      and

          10 and 12 -> 12
          12 and 10 -> 10
          15 and 14 -> 14
    

      or

          10 or 12 -> 10
          12 or 10 -> 12
          15 or 14 -> 15     
    

      Problem: Program to find whether it contains an Additive Sequence or not.

        ->] The Additive Sequence is a sequence of numbers where the sum of the first two numbers 
            is equal to the third one.
    
        Input: 66121830
        Output: True, because 6 + 6 = 12, 6 + 12 = 18, 12 + 18 = 30
        
        Input: 51123
        Output: False
        
        Input: 5115516
        Output: True, because 511 + 5 = 516
    

      Problem: Program to reverse the bits of an integer (32 bits unsigned).

        Input: 1234
        Output: 1260388352
        Explanation: 1234 represented in binary as 10011010010 and returns 1260388352 which 
                     represents in binary as 1001011001000000000000000000000.
    

      Problem: Program to check a sequence of numbers is an Arithmetic Progression or not.

       ->] Arithmetic Progression or arithmetic sequence is a sequence of numbers such that the difference 
           between the consecutive terms is constant.
    
        Input: [5, 7, 9, 11]
        Output: True
       
        Input: [5, 8, 9, 11]
        Output: False
        Explanation: The sequence 5, 7, 9, 11, 13, 15 ... is an arithmetic progression
                     with common difference of 2.
    

    Some Conversions:

    Hexadecimal ---> Decimal

      3B16 = 3×161 + 11×160 = 48 + 11 = 5`10 , here B = 11

      E7A916 = 14×163 + 7×162 + 10×161 + 9×160 = 57344 + 1792 + 160 + 9 = 5930510 , here E = 14 & A = 10

      0.816 = 0×160 + 8×16-1 = 0 + 0.5 = 0.510

      1F.01B16 = 1×161 + 15×160 + 0×16-1 + 1×16-2 + 11×16-3 = 31.006591810

    Decimal ---> Hexadecimal

      Conversion Steps:

    • Divide the number by 16.
    • Get the integer quotient for the next iteration.
    • Get the remainder for the hex digit.
    • Repeat the steps until the quotient is equal to 0.

      Example #1:

      756210

      Division by 16 Quotient Remainder Hex
      7562 / 16 472 10 A
      472 / 16 29 8 8
      29 / 16 1 13 D
      1 / 16 0 1 1

        So, 756210 = 1D8A16

          Example #2:

          3563110

          Division by 16 Quotient Remainder Hex
          35631 / 16 2226 15 F
          2226 / 16 139 2 2
          139 / 16 8 11 B
          8 / 16 0 8 8

            So, 3563110 = 8B2F16


              Problem: Program to check a sequence of numbers is a Geometric Progression or not.

               ->] Geometric Progression or geometric sequence is a sequence of numbers where each term after the first is found by 
                   multiplying the previous one by a fixed, non-zero number called the common ratio.
            
                Input: [2, 6, 18, 54]
                Output: True
               
                Input: [10, 5, 2.5, 1.25]
                Output: False
                
                Input: [5, 8, 9, 11]
                Output: False
                Explanation: The sequence 2, 6, 18, 54, ... is a geometric progression with common ratio 3.
                             Similarly, 10, 5, 2.5, 1.25, ... is a geometric sequence with common ratio 1/2.
            

              Problem 1: Program to compute the sum of the two reversed numbers and display the sum in reversed form.

                Input: 13, 14
                Output: 27
                
                Input: 130, 1
                Output: 23
                
                Input: 305, 794
                Output: 1
                Note : The result will not be unique for every number for example 31 is a reversed form of several numbers of 13, 130, 1300 etc. 
                       Therefore all the leading zeros will be omitted. Means 031 -> 31, 0001 -> 1
            

              Problem 2: Program where you take any positive integer n, if n is even, divide it by 2 to get n / 2. If n is odd, multiply it by 3 and add 1 to obtain 3n + 1. Repeat the process until you reach 1.

                Input: 12
                Output: [12, 6.0, 3.0, 10.0, 5.0, 16.0, 8.0, 4.0, 2.0, 1.0]
                Info: The Collatz conjecture is a conjecture in mathematics. The conjecture is also known as the 3n + 1 conjecture.
            	  The conjecture can be summarized as follows. Take any positive integer n. If n is even, divide it by 2 to get n / 2.
            	  If n is odd, multiply it by 3 and add 1 to obtain 3n + 1.
            	  Repeat the process (which has been called "Half Or Triple Plus One") indefinitely. 
            	  The conjecture is that no matter what number you start with, you will always eventually reach 1.
            

              Problem 1: Program to get the Hamming numbers upto a given numbers also check whether a given number is a Hamming number.

                Input: 6
                Output: True
                
                Input: 7
                Output: False
                
                Note: Hamming numbers are numbers of the form H = 2i x 3j x 5k, Where i, j, k ≥ 0.
            	  The sequence of Hamming numbers 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27. . . 
            	  consists of all numbers of the form 2i.3j.5k where i, j and k are non-negative integers.
            

              Problem 2: Program to get the Hamming Sequence upto a given numbers.

                Input: 24
                Output: 2 3 4 5 6 8 9 10 12 15 16 18 20 24
            

              Problem 1: Program to check if a given string is an Anagram of another given string.

                Input: cautioned, education
                Output: True
                
                Input: cat, rat
                Output: False
            

              Problem 2: Program to the push the occurrences of the first number to the end of a list.

                Input: [0, 2, 3, 4, 6, 7, 10]
                Output: [2, 3, 4, 6, 7, 10, 0]
                
                Input: [10, 0, 11, 12, 10, 14, 0, 17]
                Output: [0, 11, 12, 14, 0, 17, 10, 10]
            

              Problem 3: Program to check whether a given number is an Ugly number.

                Input: 12
                Output: True
                
                Input: 13
                Output: False
                Info: Ugly numbers are positive numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ...
              	  shows the first 10 ugly numbers.
            	  Note: 1 is typically treated as an ugly number.
            

              Problem 1: Program to find the single number which occurs odd times.

                Input: [4, 5, 4, 5, 2, 2, 3, 3, 2, 4, 4]
                Output: 2, here 2 occurs 3 times i.e odd times.
            

              Problem 2: Program to compute the sum of the even-valued terms in the Fibonacci sequence whose values do not exceed the given limit.

                Input: limit = 8
                Output: 10
                Explanation: 2 + 8 = 10
                
                Input: limit = 400
                Output: 188
                Explanation: 2 + 8 + 34 + 144 = 188
            

              Problem 1: Program to find the largest palindrome made from the product of two n-digit numbers.

                Input: 4
                Output: 99000099
                
                Input: 3
                Output: 906609
            

              Problem 2: Program to find the largest prime factor of a given number.

                Input: 330
                Output: 11
                Explanation: The Prime Factors of 330 are 2, 3, 5 and 11. Therefore 11 is the largest prime factor of 330.
                
                Input: limit = 200
                Output: 5
            

              Problem: Program to find the smallest positive number that is evenly divisible by all of the numbers from 1 to n.

                Input: 10
                Output: 2520
                Explanation: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
                
                Input: 20
                Output: 232792560
            

              Problem 1: Program to find the difference between the sum of the squares of the first two hundred natural numbers and the square of the sum.

                Input: 200
                Output: 401323300
                Explanation: 
            		The sum of the squares of the first twenty natural numbers is, 12+22+32+.....+202 = 404010000
            		The square of the sum of the first twenty natural numbers is, (1 + 2 + ... + 10)2 = 2686700
            		Hence,  the difference between the sum of the squares of the first twenty natural numbers 
            		        and the square of the sum is 404010000 – 2686700 = 401323300
            

              Problem 2: Program to find the nth prime number.

                Input: 6
                Output: 13
                Explanation: 13 is the 6th Prime Number.
                
                Input: 600
                Output: 4409
            

              Problem: Program to compute the sum of all the Amicable Numbers under a given number.

                Input: 500
                Output: 504
                Explanation: The smallest pair of amicable numbers is (220, 284). They are amicable 
                		 because the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110, of which the 
            		 sum is 284; and the proper divisors of 284 are 1, 2, 4, 71 and 142, of which the sum is 220.
                
                Input: 10000
                Output: 31626
            
            

              Problem: Program to find the first Triangle Number to have over n divisors.

                Input: 15
                Output: 28
                Explanation: A triangular number is a number that is the sum of all of the natural numbers up to a certain number.
                		 For example, 10 is a triangular number because 1 + 2 + 3 + 4 = 10. The first 25 triangular 
            		 numbers are: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, and 351.
            
            		 A triangular number is calculated by the equation: n(n+1)/2
            		
            		 The factors of the first five triangle numbers:
            		 1: 1
            		 3: 1, 3
            		 6: 1, 2, 3, 6
            		 10: 1, 2, 5, 10
            		 15: 1, 3, 5, 15
            		 In the above list 6 is the first triangle number to have over four divisors.
                
                Input: 100
                Output: 73920
            

              Problem 1: Program that takes a string of numbers and letters and return string which consists of letters.

                Input: 4A3B2C1D2A
                Output: AAAABBBCCDAA
                
                Input: 1P1H1P
                Output: PHP
                
            

              Problem 2: Program to find the index of the first term in the Fibonacci sequence to contain n digits.

                Input: 3
                Output: Index - 12, Numbers - 144
                Explanation: F1 = 1
            		 F2 = 1
            		 F3 = 2
            		 F4 = 3
            		 F5 = 5
            		 F6 = 8
            		 F7 = 13
            		 F8 = 21
            		 F9 = 34
            		 F10 = 55
            		 F11 = 89
            		 F12 = 144
            		 The 12th term, F12, is the first term to contain three digits.
            

              Problem: Program to compute the edit distance between two given strings.

                Input: "kitten", "sitting"
                Output: Replace: K <--> S
                        Replace: e <--> i
                        Replacement Required: 3
                Explanation: The edit distance between two strings refers to the minimum number of character insertions, deletions, 
                             and substitutions required to change one string to the other. 
            		 
            		 For example, the edit distance between "kitten" and "sitting" is three: substitute the "k" for "s",
            		              substitute the "e" for "i", and append a "g".
                
                Input: "medium", "median"
                Output: Replace: u <--> a
            	    Replace: m <--> n
            	    Replacement Required: 2
            

              Problem: Program to create a new array such that each element at index i of the new array is the product of all the numbers of a given array of integers except the one at i.

                Input: [10, 20, 30, 40, 50]
                Output: [1200000, 600000, 400000, 300000, 240000]
                
                Input: [1, 2, 0, 4]
                Output: [0, 0, 8, 0]
            

              Problem: Program to compute the person's itinerary. If no such itinerary exists, return null. If there are multiple possible itineraries, return the lexicographically smallest one.

                Input: [('SFO', 'HKO'), ('YYZ', 'SFO'), ('YUL', 'YYZ'), ('HKO', 'ORD')], Start_string = 'YUL'
                Output: ['YUL', 'YYZ', 'SFO', 'HKO', 'ORD']
                Explanation: For example, given the list of flights [('SFO', 'HKO'), ('YYZ', 'SFO'), ('YUL', 'YYZ'), ('HKO', 'ORD')]
                                     and starting airport 'YUL', you should return the list ['YUL', 'YYZ', 'SFO', 'HKO', 'ORD'].
                
                Input: [('A', 'B'), ('A', 'C'), ('B', 'C'), ('C', 'A')], Start_string = 'A'
                Output: ['A', 'C', 'A', 'B', 'C']
                
                Input: [('SFO', 'COM'), ('COM', 'YYZ')], Start_string = 'COM'
                Output: Invalid Intinerary
            

              Problem: Program to generate list with 'width'-bit gray code.

                Input: 3
                Output: 0  0  0
                        0  0  1
                        0  1  0
                        0  1  1
                        1  0  0
                        1  0  1
                        1  1  0
                        1  1  1
                
                Input: 2
                Output: 0  0
                        0  1
                        1  0
                        1  1
                
            

              Problem: Program to Reverse a linked list.

                Input: 1 -> 2 -> 3 -> 4 -> NULL
                Output: 4  -> 3 -> 2 -> 1 -> NULL
                
                Input: NULL
                Output: NULL
            

              Problem: Program for Tower of Hanoi.

                Input: 2
                Output: Move Disk from A to B
            	    Move Disk from A to C
            	    Move Disk from B to C
                
                Input: 3
                Output: Move Disk from A to C
            	    Move Disk from A to B
            	    Move Disk from C to B
            	    Move Disk from A to C
            	    Move Disk from B to A
            	    Move Disk from B to C
            	    Move Disk from A to C
            

              Problem: Program for Difference between sums of odd and even digits.

                Input: 1212112
                Output: Yes
                Explanation: the odd position element is 2+2+1=5
                             the even position element is 1+1+1+2=5
                             the difference is 5-5=0.so print yes.
            	    
                 Input: 12345
                 Output: No
                 Explanation: the odd position element is 1+3+5=9
                              the even position element is 2+4=6
                              the difference is 9-6=3 not  equal to zero. So print no.
            

              Problem: Program to Print Matrix in Z form.

                Input: [[4, 5, 6, 8], 
                        [1, 2, 3, 1], 
                        [7, 8, 9, 4], 
                        [1, 8, 7, 5]]
            	    
                Output: 4 5 6 8
                            3
                          8
                        1 8 7 5
                
                Input: [[4, 5, 6, 8, 5],
                        [1, 2, 3, 1, 4],
                        [7, 8, 9, 4, 7],
                        [1, 8, 7, 5, 2],
                        [7, 9, 5, 6, 9],
                        [9, 4, 5, 6, 6]]
            	    
                Output: 4 5 6 8 5
                              1
                            9
                          8
                        7
                       9 4 5 6 6
            

              Problem: Program to perform all the Insert operations in Linked List.

                Input: L_list.Insert_At_Beginning(1)
                       L_list.Insert_At_Beginning(2)
                       L_list.Insert_At_Beginning(3)
                       L_list.Insert_At_End(4)
                       L_list.Insert_At_End(5)
                       L_list.Insert_At_End(6)
                       L_list.Insert_After(L_list.head.next, 10)
                Output: 3 -> 2 -> 10 -> 1 -> 4 -> 5 -> 6 -> None
            

              Problem: Program to Delete a node of Linked List.

                Input: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> None, key = 4
                Output: 1 -> 2 -> 3 -> 5 -> 6 -> None
            

              Problem: Program to Sort a Linked List.

                Input: 8 -> 5 -> 10 -> 7 -> 6 -> 11 -> 9 -> None
                Output: 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> None
            

              Problem: Program to swap nodes in a Singly Linked List without swapping data.

                Input: 8 -> 5 -> 10 -> 7 -> 6 -> 11 -> 9 -> None, key1 = 8, key2 = 5
                Output: 5 -> 8 -> 10 -> 7 -> 6 -> 11 -> 9 -> None
            

              Problem: Program to Merge 2 sorted linked lists.

                Input: L1 = 5 -> 8 -> 10, L2 = 7 -> 9 -> 11 ->12
                Output: 5 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> None
            

              Problem: Program for Merge Sort using Linked List.

                Input: 5 -> 8 -> 10 -> 7 -> 9 -> 11 -> 12 -> None
                Output: 5 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> None
            

              Problem: Program to Reverse a Linked List in groups of given size.

                Input: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> None, size = 2
                Output: 2 -> 1 -> 4 -> 3 -> 6 -> 5 -> 7 -> None
            

              Problem: Program to Detect and Remove Loop in a Linked List.

                Input: 8 -> 5 -> 10 -> 7 -> 6 -> 11 -> 9 -> 5
                Output: Loop Found, 8 -> 5 -> 10 -> 7 -> 6 -> 11 -> 9 -> None
            

              Problem: Program to Add two numbers represented by Linked Lists.

                Input: 7 -> 5 -> 9 -> 4 -> 6 -> None // i.e. 64957, 8 -> 4 -> None // i.e. 48
                Output: 5 -> 0 -> 0 -> 5 -> 6 -> None // i.e. 65005
            

              Problem: Program to Rotate a Linked List.

                Input: 9 -> 11 -> 6 -> 7 -> 10 -> 5 -> 8 -> None, key = 4
                Output: 10 -> 5 -> 8 -> 9 -> 11 -> 6 -> 7 -> None
            

              Problem: Program for Circular Singly Linked List Insertion.

                Input:  L_list.Add_to_Empty(6)
                	    L_list.Add_to_Begin(4)
                	    L_list.Add_to_Begin(2)
                	    L_list.Add_to_End(8)
                	    L_list.Add_to_End(12)
                	    L_list.Add_After(10, 8)
                Output: 2 -> 4 -> 6 -> 8 -> 10 -> 12 -> 2
            

              Problem: Program to Split a Circular Linked List into two halves.

                Input: 10 -> 12 -> 8 -> 2 -> 4 -> 6
                Output: First Split Linked List: 10 -> 12 -> 8
                        Second Split Linked List: 2 -> 4 -> 6
            

              Problem: Program for Sorted insert in Circular Linked List.

                Input: [12, 56, 2, 11, 1, 90]
                Output: 1 -> 2 -> 11 -> 12 -> 56 -> 90 -> 1
            

              Problem: Program for Doubly Linked List Insertion.

                Input: L_list.Add_at_front(5)
                       L_list.Add_at_front(7)
                       L_list.Add_at_front(9)
                       L_list.Add_at_front(8)
                       L_list.Add_End(2)
                       L_list.Add_End(6)
                       L_list.Add_After(L_list.head.next, 1)
            	   
                Output: Traversal in Forward Direction: 8 -> 9 -> 1 -> 7 -> 5 -> 2 -> 6
            	    Traversal in Reverse Direction: 6 -> 2 -> 5 -> 7 -> 1 -> 9 -> 8
            

              Problem 1: Program for Binary Insertion Sort.

                Input: 12, 56, 2, 11, 1, 90
                Output: 1, 2, 11, 12, 56, 90
            

              Problem 2: Program for Linear Insertion Sort.

                Input: 12, 56, 2, 11, 1, 90
                Output: 1, 2, 11, 12, 56, 90
            

              Problem: Program to Delete a node in Doubly Linked List.

                Input: 8 -> 9 -> 1 -> 7 -> 5 -> 2 -> 6, Node to be Deleted: 1, 7, 6
                Output: 8 -> 9 -> 5 -> 2
            

              Problem: Program to Reverse a Doubly Linked List.

                Input: 8 -> 9 -> 1 -> 7 -> 5 -> 2 -> 6
                Output: 6 -> 2 -> 5 -> 7 -> 1 -> 9 -> 8
            

              Problem: Program to Reverse a Doubly Linked List using Stack.

                Input: 8 -> 9 -> 1 -> 7 -> 5 -> 2 -> 6
                Output: 6 -> 2 -> 5 -> 7 -> 1 -> 9 -> 8
            

              Problem: Program for Infix to Postfix Conversion using Stack.

                Input: "a+b*(c^d-e)^(f+g*h)-i"
                Output: abcd^e-fgh*+^*+i-
            

              Problem: Program for Evaluation of Postfix Expression Using Stack.

                Input: "231*+9-"
                Output: -4
            

              Problem: Check for Balanced Parentheses in an expression.

                Input: [()]{}{[()()]()}
                Output: Balanced
            
                Input: [(])
                Output: Not Balanced 
            

              Problem: The Stock Span Problem.

                Input: [100, 80, 60, 70, 60, 75, 85]
                Output: [1, 1, 1, 2, 1, 4, 6]