Priority Queue in C and C++

Here you will get implementation of priority queue in C and C++ with program example. Priority Queue is an ordered list of homogeneous elements. In normal queue, service is provided on the basis of First-In-First-Out. In a priority queue service isn’t provided on the basis of First-In-First-Out service, but rather then each element has a… Read More »

Category: DSA

TCP/IP Socket Programming in C and C++ (Client Server Program)

This tutorial will help you to know about concept of TCP/IP Socket Programming in C and C++ along with client server program example. What is Socket? We know that in Computer Networks, communication between server and client using TCP/IP protocol is connection oriented (which buffers and bandwidth are reserved for client). Server will get so… Read More »

Hashing in C and C++

In this tutorial you will learn about Hashing in C and C++ with program example. You will also learn various concepts of hashing like hash table, hash function, etc. Hashing in Data Structure Searching is dominant operation on any data structure. Most of the cases for inserting, deleting, updating all operations required searching first. So… Read More »

Category: DSA

Difference between BFS and DFS

Here you will learn about difference between BFS and DFS algorithm or BFS vs. DFS. Breadth First Search (BFS) and Depth First Search (DFS) are two popular algorithms to search an element in Graph or to find whether a node can be reachable from root node in Graph or not. And these are popular traversing methods… Read More »

Category: DSA

Bellman-Ford Algorithm in C and C++

Here you will learn about Bellman-Ford Algorithm in C and C++. Dijkstra and Bellman-Ford Algorithms used to find out single source shortest paths. i.e. there is a source node, from that node we have to find shortest distance to every other node. Dijkstra algorithm fails when graph has negative weight cycle. But Bellman-Ford Algorithm won’t fail… Read More »

Topological Sort in C and C++

Here you will learn and get program for topological sort in C and C++. We know many sorting algorithms used to sort the given data. It may be numeric data or strings. Take a situation that our data items have relation. They are related with some condition that one should happen only after other one… Read More »

Category: DSA

Matrix Chain Multiplication in C and C++

Here you will learn about Matrix Chain Multiplication with example and also get a program that implements matrix chain multiplication in C and C++. Before going to main problem first remember some basis. We know that, to multiply two matrices it is condition that, number of columns in first matrix should be equal to number of… Read More »

Travelling Salesman Problem in C and C++

Here you will learn about Travelling Salesman Problem (TSP) with example and also get a program that implements Travelling Salesman Problem in C and C++. Let say there are some villages (1, 2, 3, 4, 5). To work with worst case let assume each villages connected with every other villages. And there is a Salesman living… Read More »

Python Linear Search

Here you will get program for linear search in python. Linear search is one of the simplest searching algorithm in which targeted item in sequentially matched with each item in a list. It is worst searching algorithm with worst case time complexity O (n). Below is its implementation. Image Source Program for Python Linear Search… Read More »

Null Pointer in C

In this tutorial you will learn about null pointer in C with examples. When we declare a pointer, by default it points to some random memory location. If you will access the pointer then it may give some undesired value or the program may crash. What is Null Pointer in C? A pointer pointing to… Read More »

Difference between Recursion and Iteration

In this tutorial you will learn about difference between recursion and iteration with example. Both recursion and iteration are used for executing some instructions repeatedly until some condition is true. A same problem can be solved with recursion as well as iteration but still there are several differences in their working and performance that I… Read More »

Python Program to Check Palindrome Number

Here you will get python program to check palindrome number. A number is said to be palindrome if it is equal to its reverse. For example 121, 555, etc are palindrome while 124, 367, etc are not. Python Program to Check Palindrome Number

Output enter a number: 12321 number is palindrome Comment below if… Read More »