C/C++

Linked List using C++ part 2

Submitted by moazkhan on

Data Structure using C++

In this tutorial, you will learn implementation of following functions 1. Constructor 2. Checkempty() 3. Traversal 4. Insertion at beginning Along with this tutorial, C++ code is given which has structure node and class Linklist containing these codes with a main to help you in understanding how these functions are being used. What is the code of constructor? The code of the constructor utilizes the fact that we want to make a check empty function which returns 1 if linked list has no element and 0 if it has elements.

Linked Lists using C++

Submitted by moazkhan on

Linked Lists using C++

In this tutorial, you will learn 1. Different operations of linked list. 2. Implementation of linked list. 3. Why some of the basic functions are available What are the different operations in linked list? Following are the operations linked list is supposed to perform. 1. Traversal: There must be a way to access the elements of a linked list. In linked list, we have data and a pointer pointing to next element.

Data Structures using C++

Submitted by moazkhan on

Data Structures using C++

Only basic concepts will be discussed in this tutorial. Implementation using codes will be discussed in next tutorial. In this tutorial, you will learn 1. Advantages of using arrays. 2. Draw backs of arrays. 3. The basic concepts of linked list. 4. Types of Linked List. 5. Linked list vs. Arrays. 6. Creating a linked list using Object Oriented Programming. What are some advantages of arrays? As most of you know the basics of C++ programming or programming in general so you all must have used arrays.

Introduction to Data Structures using C++

Submitted by moazkhan on

Introduction to Data Structures using C++

Objectives: In this tutorial, I will 1. Briefly explain the meaning of data structures. 2. Explain the importance of data structures. 3. List different data structures. 4. Tips on selecting the type of data structure to use for a particular application. What does the word Data Structures mean? A Data Structure is a way of organizing or grouping the data available to you so that it can be used later in a convenient way using the minimum resources of computer (e.g. memory ) and user (e.g. time ).

Quick Prime Number Test - Method: Basic

Submitted by DoctorSpeedCode on
With prime numbers, we always get a headache. We will see 2 tutorials about quick prime number testing, this one at a basic level, the next one at an advanced level. The idea of our test is the following: We create an array of bool values, to represent numbers like this: 0 - FALSE 1 - FALSE 2 - TRUE 3 - TRUE 4 - FALSE 5 - TRUE 6 - FALSE 7 - TRUE 8 - FALSE 9 - FALSE 10 - FALSE 11 - TRUE And so forth! Where we have TRUE, it is a prime number, where we have FALSE, it is not a prime number.