## GDB useful commands for C-program debugging

To debug a C-program in gdb, compile the program and use the following command to enter into gdb mode in linux terminal – gdb ./your_program n – execute the next… Read more »

- Home
- Algorithms
- Computer Graphics
- Lab 1 – Print Green Window
- Lab 2 – Sierpinski Triangle
- Lab 3 – Two Dots
- Lab 4 – Square in Square
- Lab 5 – Qaudrilateral
- LAB 6- e^(-x)*cos(2*x*π ) Graph
- Lab 7 – sin(x)/x Graph
- Lab 8 – Dot on Click
- Lab 9 – (i) Chess Board
- Lab 9 – (ii) Colored Chess Board
- Lab 10 – Freehand Drawing
- Lab 11 – Mouse Click Polyline
- Lab – 12. Color Freehand Drawing

- Data Structures
- Networking
- About Us

Man is still the most extraordinary computer of all

To debug a C-program in gdb, compile the program and use the following command to enter into gdb mode in linux terminal – gdb ./your_program n – execute the next… Read more »

We have seen sorting on numbers in arrays. Now what about sorting a linked list using bubble sort? Before we continue, we must keep in mind that a list is… Read more »

Appending a linked list onto another is pretty easy. All you have to do is, make the last node’s next pointer of the first list to point to the head… Read more »

Algorithm: [sourcecode lang=”cpp”] void RemoveDuplicates(intnode* head) { intnode* current = head; if (current == NULL) return; // do nothing if the list is empty // Compare current node with next… Read more »

We had discussed here a few applications of stack. And here is another one. Converting positive decimals to binary using a stack. You can use a stack here to reverse… Read more »

Radix sort by sorting the input numbers on each digit, for each of the digits in the numbers. There are 2 types of radix sorts: Least Significant Digit(LSD) Radix Sort… Read more »

A merge sort is based on the classic divide and conquer paradigm. Steps: 1. Divide: Partition the n-element sequence to be sorted into two sets of n/2 elements each. 2. Conquer: Sort… Read more »

Quick Sort is one of the fastest sorting algorithms used. Steps: 1. Choose a pivot element. Here, we are choosing the middle element. It could even be randomly chosen. 2…. Read more »

Algorithm: Use Recursion. If both the trees are NULL, return true. If only one of the trees is NULL return false. Recursively find if all pairs of corresponding left nodes… Read more »