Skip to content

Category Archives: Python Programs

Given a string str, find the length of the longest substring without repeating characters.  For “ABDEFGABEF”, the longest substring are “BDEFGA” and “DEFGAB”, with length… Read More
Given a doubly linked list, write a function to sort the doubly linked list in increasing order using merge sort.For example, the following doubly linked… Read More
In this article, we will discuss how to Iterate over Tuples in Dictionary in Python.  Method 1: Using index We can get the particular tuples… Read More
Given two linked lists sorted in increasing order. Merge them such a way that the result list is in decreasing order (reverse order). Examples:  Input:… Read More
Given a singly linked list, Your task is to remove every K-th node of the linked list. Assume that K is always less than or… Read More
In this article, we will discuss how to create a dictionary of sets in Python. Method 1: Naive Approach We can create a dictionary of… Read More
In this article, we are going to see how to append to a list in a Python dictionary. Method 1: Using += sign on a… Read More
Given a string, recursively remove adjacent duplicate characters from the string. The output string should not have any adjacent duplicates. See the following examples. Examples: … Read More
Given a singly linked list, delete the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the linked list… Read More
In this article, we will discuss how to create a dictionary of tuples in Python. Dictionary of tuples with tuples as keys Here we will… Read More
In this article, we will discuss how to iterate over a nested dictionary in Python. Nested dictionary means dictionary inside a dictionary and we are… Read More
Write a program to print all the LEADERS in the array. An element is leader if it is greater than all the elements to its… Read More
In this article, we will discuss how to create a List of Tuples using for loop in Python. Let’s suppose we have a list and… Read More

Start Your Coding Journey Now!