Tag: Data Structure

LRU and FIFO L1 Cache Implementation using C

This is a C program to demonstrate cache mechanism by simulating a cache in C. The source code can run in any C Compiler with minor modifications if required. It can run on real memory traces as input to your cache simulator. We have implemented two cache replacement policies i.e. least recently used (LRU) and First-in first-out (FIFO) replacement policies.

Read More

C Algorithms Library

This article is about a collection of common Computer Science algorithms which may be used in C projects. The C Programming Language has a much smaller Standard Library as compared to other more modern programming languages such as Java or Python. The library provides a basic set of mathematical functions, string manipulation, type conversions, and file and console-based I/O.

Read More

Find the middle element of linked list in C

In order to find middle element of linked list in one pass, you need to maintain two pointers, one increment at each node while other increments after two nodes at a time. By having this arrangement, when first pointer reaches end, second pointer will point to middle element of linked list.

Read More

Free Programming Abstractions Course – SEE

Stanford Engineering Everywhere (SEE) offers few computer science courses to students online and at no charge. Programming Abstractions course covers advanced programming topics such as recursion, algorithmic analysis, and data abstraction using the C++ programming language, which is similar to both C and Java.

Read More

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...

Read More

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...

Read More

Subscribe for updates

Join Over 20,000+ Readers