Python – Convert day number to date in particular year
Given day number, convert to date it refers to. Input : day_num = “339”, year = “2020” Output : 12-04-2020 Explanation : 339th Day of 2020 is… Read More »
Given day number, convert to date it refers to. Input : day_num = “339”, year = “2020” Output : 12-04-2020 Explanation : 339th Day of 2020 is… Read More »
Given a dictionary perform its reordering by right rotating dictionary keys by K. Examples: Input : test_dict = {1:6, 8:1, 9:3, 10:8, 12:6, 4:9}, K… Read More »
Given Matrix, extract rows with complex data types. Examples: Input : test_list = [[4, 2, 5], [1, [3, 4], 9], [5], [7, (2, 3), 3,… Read More »
Given Dictionary, resize keys to K by getting starting k elements from keys. Input : test_dict = {“geeksforgeeks” :3, “best” :3, “coding” :4, “practice” :3},… Read More »
Given a String Matrix, sort each row by palindromic strings count. Input : test_list = [[“nitin”, “meem”, “geeks”], [“peep”], [“gfg”, “is”, “best”], [“sees”, “level”, “mom”,… Read More »
Given a Matrix, the following article extracts a specifies number of rows that has a maximum sum. Input : test_list = [[3, 4, 5, 6],… Read More »
Given a Matrix, the following articles shows how to extract all the rows with a specified length. Input : test_list = [[3, 4, 5, 6],… Read More »
Given a List perform reordering to get similar elements in consecution. Input : test_list = [4, 7, 5, 4, 1, 4, 1, 6, 7, 5] Output… Read More »
Given a list, remove all the occurrence of y before element x in list. Input : test_list = [4, 5, 7, 4, 6, 7, 4,… Read More »
Given two Matrices, check if all rows contain at least one element common with the same index row of other Matrix. Input : test_list1 =… Read More »
Given a List, test if all occurrences of y are after the occurrence of x in the list. Input : test_list = [4, 5, 6,… Read More »
Given the Python list, reform element to have K digits in a single element. Input : test_list = [223, 67, 332, 1, 239, 2, 931],… Read More »
Given a Strings List, extract all the strings, whose consecutive characters are at common difference in ASCII order. Input : test_list = [“abcd”, “egil”, “mpsv”,… Read More »
Given a dictionary, count instances where dictionary item position equals key or value. Valid for Py >= 3.6 [ Introduction of dictionary ordering ]. Input… Read More »
Given list of elements, convert each element to a key-value pair dictionary, dividing digits equally. Input : test_list = [2323, 82, 129388, 234, 95] Output :… Read More »