Python program to find middle of a linked list using one traversal
Given a singly linked list, find middle of the linked list. Given a singly linked list, find middle of the linked list. For example, if… Read More »
Given a singly linked list, find middle of the linked list. Given a singly linked list, find middle of the linked list. For example, if… Read More »
The program must accept an integer N as the input. The program must print the desired pattern as shown in the example input/ output. Examples:… Read More »
Given two lists, write a Python program to merge the two lists into list of tuples. Examples: Input : list1 = [1, 2, 3] list2… Read More »
Many a times we encounter a problem where we wish to use the merge function of merge sort and is a classical problem that occurs… Read More »
Some of the list operations are quite general and having shorthands without needing to formulate a multiline code is always required. Wanting to construct the… Read More »
The classical problem that can be handled quite easily by Python and has been also dealt with many times is finding if a string is… Read More »
There are multiple ways we can print the Emojis in Python. Let’s see how to print Emojis with Uniocdes, CLDR names and emoji module. Using… Read More »
Given a set, write a Python program to convert the given set into list. Examples: Input : {1, 2, 3, 4} Output : [1, 2,… Read More »
Given a string, print all the possible substrings which are also the prefix of the given string. Examples: Input : ababc Output : a, ab,… Read More »
In this problem we will find the second largest value in the given Dictionary. Examples: Input : {‘one’:5, ‘two’:1, ‘three’:6, ‘four’:10} Output : Second largest… Read More »
In Python, while operating with String, one can do multiple operations on it. Let’s see how to iterate over characters of a string in Python.… Read More »
Given a list, write a Python program to convert the given list into a tuple. Examples: Input : [1, 2, 3, 4] Output : (1,… Read More »
In Python, dictionary is a collection which is unordered, changeable and indexed. Dictionaries are written with curly brackets, and they have keys and values. It… Read More »
Given an integer X and a binary tree, the task is to count the number of triplet triplets of nodes such that their sum is… Read More »
Given a sorted list and an element, Write a Python program to insert the element into the given list in sorted position. Examples: Input :… Read More »