Find the middle element of linked list in C

Data structures and algorithm questions are important part of any programming job interview, whether Java interview, C/C++ interview or any other programming language. Since data structures are core programming concept, it’s mandatory for all programmers, to know...

Binary Trees

A binary tree is made of nodes, where each node contains a “left” pointer, a “right” pointer, and a data element. The “root” pointer points to the topmost node in the tree. The left and right pointers recursively point to smaller...

Arrays as Data Structure in C/C++ Programming

As discussed in the previous post, there are two types of data structures available to C and C++ programmers. One is already built into the programming language and other one is a bit complex in a sense that it can be implemented using the built in data structures and...

Data Structure Articles

The basic aim of mycplus.com website was to develop a website for students of C/C++ and data structures. There are lots of tutorials and source code covering different aspects of C/C++ programming language. Today I have decided to write few articles about data...

Java Program to demonstrate of Linked List

This is a very simple demonstration of linked list in java programming language. Very nice and well commented java source code for beginners. User can “get” and “set” the list items as well as traverse through “previous” and...

Java Program to show Stack Implementation

This is a simple Java program to demonstrate Stack data structure implementation. An object of type IntStack is a stack of real numbers, with the standard stack operations push(int N), pop(), and isEmpty(). A makeEmpty() operation is also provided to remove all items...

Stack implementation with array

This java code basically implements stack functionality. It can Pop and Push an item in stack with the help of array. The item can only be an integer number and inernally the java program uses arrays to maintain items in stack. [code=’java’]...

B-Tree implementation

This is implementation of Bayer-Trees, which are normally used for indices of data bases. These routines provide all stuff that is needed to create and destroy; insert, update and delete; load and destroy; search and traverse; check a tree. Sort huge amounts of data...

Fundamentals of data structures

This introduction to the fundamentals of data structures explores abstract concepts, considers how those concepts are useful in problem solving, explains how the abstractions can be made concrete by using a programming language, and shows how to use the C language for...

Sort Huge amount of data

The bigsort routine implements a way to sort huge amounts of data that do not fit into main memory by using a multi-phase sorting on files. It is a implementation from the book “Algorithms and data structures” by Niklaus Wirth. Additionally, this routine...

Data Structure Library

Ubiqx is a collection of ANSI C compatible modules for implementing linked lists, binary trees, caching and spare arrays. The goal of the ubiqx project is to develop a set of clean, small, re-usable code modules which implement fundamental constructs and mechanisms,...

Process Binary Trees – Java

This program demonstrates a few routines for processing binary sort trees. It uses a binary sort tree of strings. The user types in strings. The user’s string is converted to lower case, and — if it is not already in the tree — it is inserted into...

Using Templates to implement Stack

Using Templates to implement Stack C++ /******************************************************* * MYCPLUS Sample Code - http://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of...

Linked List Demo

A small linked list traversal program to show the basics of linked lists. C /******************************************************* * MYCPLUS Sample Code - http://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided...