Linked List

A Linked List or Singly Linked List is a linear data structure which collectively represents a sequence of data. In …

Introduction to Linked list

In this introduction part of the linked list, we will learn about the basics of a Linked List, like its …

Maximum area histogram

Write a program to find the maximum area under histogram or largest rectangle in a histogram. It's optimized solution can …

Nearest smaller to left

Write a program to find the nearest smaller element to the left of each element in an array.

Nearest smaller to right

Write a program to find the nearest smaller element or next smaller element to the right of each element in …

Stock span problem

Stock span problem is a financial problem mostly asked in interviews and its optimized solution can be obtained using stack. …

Nearest greater to left

Write a program to find the nearest greater element or next greater to the left of each element in an …

Stack using linked list

In this tutorial, we will implement a stack using linked list with their time and space complexity.

Stack using array

In this tutorial, we will implement a stack using array by using the fixed array and dynamic array method with …

Nearest greater to right

Write a program to find the nearest greater element or next greater to the right of each element in an …

Decorators in Python: Extending functionality of a function

Decorators are one of the most powerful concepts in python. A decorator is a function which takes another function or …

Generators in python: How to use Generators and yield in Python

A generator is a function which is responsible to generate a sequence of values. It can be written like a …

Django slug tutorial: adding slug field in a django model

In this tutorial, we are going to learn what is a slug and how to add slug or SlugField in …

C Program to count number of vowels and consonants in a string

Write a C Program to count the number of vowels and consonants in a string using loops or an array. …

C Program to count alphabets, digits and special characters in a string

C Program to count alphabets, digits and special characters in a string using loop. How to find number of alphabets, …

C Program to toggle case of a string

C program to toggle the case of a string using the loop i.e., convert the uppercase alphabets into lowercase and …

C Program to convert uppercase string to lowercase

C Program to convert uppercase characters in a string to lowercase characters using loop or strlwr string function. How to …

C Program to convert lowercase string to uppercase

C Program to convert lowercase characters in a string to uppercase characters using loop or strupr string function. How to …

C Program to concatenate two strings

C Program to concatenate two strings using loop or strcat string function in C language. How to concatenate two strings …

C Program to copy one string to another string

Write a C program to copy one string to another string using a loop and strcpy function. We can use …