Treceți la conținutul principal

ALGORITMI CPP INDEX

C++ Source Code

Program 2.1
Program to compute EQN
Program 2.2
Program to compute EQN using Horner's rule
Program 2.3
Recursive program to compute n!
Program 2.4
Linear search to find EQN
Program 2.5
Program to compute EQN
Program 2.6
Program to compute EQN
Program 2.7
Program to compute EQN using Horner's rule
Program 2.8
Program to compute EQN
Program 2.9
Program to compute EQN using the closed-form expression
Program 3.1
Program 2.2 Again
Program 3.2
Program to compute EQN for EQN
Program 3.3
Non-recursive program to compute Fibonacci numbers
Program 3.4
Recursive program to compute Fibonacci numbers
Program 3.5
Bucket Sort
Program 4.1
Array<T> Class Definition
Program 4.2
Array<T> Class Default Constructor Definition
Program 4.3
Array<T> Class Constructor Definition
Program 4.4
Array<T> Class Copy Constructor Definition
Program 4.5
Array<T> Class Destructor Definition
Program 4.6
Array<T> Class Accessor Function Definitions
Program 4.7
Array<T> Class Subscripting Function Definitions
Program 4.8
Array<T> Class SetBase and SetLength Member Function Definitions
Program 4.9
LinkedList<T> and ListElement<T> Class Definitions
Program 4.10
ListElement<T> Class Member Function Definitions
Program 4.11
LinkedList<T> Class Default Constructor Definition
Program 4.12
LinkedList<T> Class Destructor and Purge Member Function Definitions
Program 4.13
LinkedList<T> Class Accessor Function Definitions
Program 4.14
LinkedList<T> Class First and Last Function Definitions
Program 4.15
LinkedList<T> Class Prepend Function Definition
Program 4.16
LinkedList<T> Class Append Function Definition
Program 4.17
LinkedList<T> Class Copy Constructor Definition
Program 4.18
LinkedList<T> Class Extract Function Definition
Program 4.19
LinkedList<T> Class InsertAfter and InsertBefore Function Definitions
Program 4.20
Array2D<T> and Array2D<T>::Row Class Definitions
Program 4.21
Array2D<T> Class Member Functions
Program 4.22
Matrix<T> Class Definition
Program 4.23
Matrix<T> Class Multiplication Operator Definition
Program 5.1
Object Class Definition
Program 5.2
Object Operator Definitions
Program 5.3
Object Class Member Function Definitions
Program 5.4
NullObject Class Definition
Program 5.5
NullObject Class Member Function Definitions
Program 5.6
Wrapper<T> Class Definition
Program 5.7
Wrapper<T> Class Member Function Definitions
Program 5.8
Int, Char, Double and String Class Definitions
Program 5.9
Container Class Definition
Program 5.10
Container Class Member Function Definitions
Program 5.11
Visitor Class Definition
Program 5.12
Container Class Put Function Definition
Program 5.13
Iterator Class Definition
Program 5.14
NullIterator Class Definition
Program 5.15
NullIterator Class Member Function Definitions
Program 5.16
Container Class NewIterator Member Function Definition
Program 5.17
Ownership Class Definition
Program 5.18
Association Class Definition
Program 5.19
Association Class Constructor and Destructor
Program 5.20
Association Class Member Functions
Program 5.21
SearchableContainer Class Definition
Program 6.1
Stack Class Definition
Program 6.2
StackAsArray Class Definition
Program 6.3
StackAsArray Class Constructor, Destructor and Purge Member Function Definitions
Program 6.4
StackAsArray Class Push, Pop, and Top Member Function Definitions
Program 6.5
StackAsArray Class Accept Member Function Definition
Program 6.6
StackAsArray::Iter Class Member Function Definitions
Program 6.7
StackAsLinkedList Class Definition
Program 6.8
StackAsLinkedList Class Constructor, Destructor and Purge Member Function Definitions
Program 6.9
StackAsLinkedList Class Push, Pop, and Top Member Function Definitions
Program 6.10
StackAsLinkedList Class Accept Member Function Definition
Program 6.11
StackAsLinkedList::Iter Class Member Function Definitions
Program 6.12
Stack Application-A Single-Digit, RPN Calculator
Program 6.13
Queue Class Definition
Program 6.14
QueueAsArray Class Definition
Program 6.15
QueueAsArray Class Constructor, Destructor and Purge Member Function Definitions
Program 6.16
QueueAsArray Class Head, Enqueue and Dequeue Member Function Definitions
Program 6.17
QueueAsLinkedList Class Definition
Program 6.18
QueueAsLinkedList Class Constructor, Destructor and Purge Member Function Definitions
Program 6.19
QueueAsLinkedList Class Enqueue, Head and Dequeue Member Function Definitions
Program 6.20
Queue Application-Breadth-First Tree Traversal
Program 6.21
Deque Class Definition
Program 6.22
Deque Class Enqueue and Dequeue Member Function Definitions
Program 6.23
DequeAsArray Class Definition
Program 6.24
DequeAsArray Class Head EnqueueHead and DequeueHead Member Function Definitions
Program 6.25
DequeAsArray Class Tail EnqueueTail and DequeueTail Member Function Definitions
Program 6.26
DequeAsLinkedList Class Definition
Program 6.27
DequeAsLinkedList Class Head, EnqueueHead and DequeueHead Member Function Definitions
Program 6.28
DequeAsLinkedList Class Tail, EnqueueTail and DequeueTail Member Function Definitions
Program 7.1
List and Ordered Class Definitions
Program 7.2
ListAsArray Class Definition
Program 7.3
ListAsArray Class Constructor, Insert Member Function and Subscripting Operator Definitions
Program 7.4
ListAsArray Class IsMember and Find Member Function Definitions
Program 7.5
ListAsArray Class Withdraw Member Function Definition
Program 7.6
ListAsArray::Pos Class Definition
Program 7.7
ListAsArray Class FindPosition Member Function and Subscripting Operator Definitions
Program 7.8
ListAsArray Class InsertAfter Member Function Definition
Program 7.9
ListAsArray Class Withdraw Member Function Definition
Program 7.10
ListAsLinkedList Class Definition
Program 7.11
ListAsLinkedList Class Constructor, Insert Member Function and Subscripting Operator Definitions
Program 7.12
ListAsLinkedList Class IsMember and Find Member Function Definitions
Program 7.13
ListAsLinkedList Class Withdraw Member Function Definition
Program 7.14
ListAsLinkedList::Pos Class Definition
Program 7.15
ListAsLinkedList Class FindPosition Member Function and Subscripting Operator Definitions
Program 7.16
ListAsLinkedList Class InsertAfter Member Function Definition
Program 7.17
ListAsLinkedList Class Withdraw Member Function Definition
Program 7.18
Term Class Definition
Program 7.19
Polynomial Class Definition
Program 7.20
SortedList Class Definition
Program 7.21
SortedListAsArray Class Definition
Program 7.22
SortedListAsArray Class Insert Member Function Definition
Program 7.23
SortedListAsArray Class FindOffset Member Function Definition
Program 7.24
SortedListAsArray Class Find and FindPosition Member Function Definitions
Program 7.25
SortedListAsArray Class Withdraw Member Function Definition
Program 7.26
SortedListAsLinkedList Class Definition
Program 7.27
SortedListAsLinkedList Class Insert Member Function Definition
Program 7.28
Term Class Definition
Program 7.29
Polynomial Class Definition
Program 7.30
Polynomial Addition Operator Definition
Program 8.1
Integral Hash Function Definitions
Program 8.2
Floating-Point Hash Function Definition
Program 8.3
Character String Hash Function Definition
Program 8.4
Wrapper<T> Class Hash Member Function Definition
Program 8.5
Container Class Hash Member Function Definition
Program 8.6
Association Class Hash Member Function Definition
Program 8.7
HashTable Class Definition
Program 8.8
HashTable Class Constructor and H Member Function Definitions
Program 8.9
ChainedHashTable Class Definition
Program 8.10
ChainedHashTable Class Constructor, Destructor and Purge Member Function Definitions
Program 8.11
ChainedHashTable Class Insert and Withdraw Member Function Definitions
Program 8.12
ChainedHashTable Class Find Member Function Definition
Program 8.13
ChainedScatterTable Class Definition
Program 8.14
ChainedScatterTable::Entry Class Constructor and ChainedScatterTable Class Constructor, Destructor and Purge Member Function Definitions
Program 8.15
ChainedScatterTable Class Insert and Find Member Function Definitions
Program 8.16
ChainedScatterTable Class Withdraw Member Function Definition
Program 8.17
OpenScatterTable Class Definition
Program 8.18
OpenScatterTable Class Constructor and Destructor and OpenScatterTable::Entry Class Constructor Definitions
Program 8.19
OpenScatterTable Class C, FindUnoccupied, and Insert Member Function Definitions
Program 8.20
OpenScatterTable Class FindMatch and Find Member Function Definitions
Program 8.21
OpenScatterTable Class Withdraw Member Function Definition
Program 8.22
OpenScatterTable Class Alternate Withdraw Member Function Definition
Program 8.23
Hash/Scatter Table Application-Counting Words
Program 9.1
Tree Class Definition
Program 9.2
Tree Class Traversal Member Function Definitions
Program 9.3
PrePostVisitor, PreOrder, InOrder and PostOrder Class Definitions
Program 9.4
Tree Class BreadthFirstTraversal Member Function Definition
Program 9.5
Tree Class Accept Member Function Definition
Program 9.6
Tree::Iter Class Definition
Program 9.7
Tree::Iter Class Constructor and Reset Member Function Definitions
Program 9.8
Tree::Iter Class Constructor Operator Member Function Definitions
Program 9.9
GeneralTree Class Definition
Program 9.10
GeneralTree Class Constructor, Destructor and Purge Member Function Definitions
Program 9.11
GeneralTree Class Key, Subtree, AttachSubtreeand DetachSubtree Member Function Definitions
Program 9.12
NaryTree Class Definition
Program 9.13
NaryTree Class Constructor Definitions
Program 9.14
NaryTree Class Member Function Definitions
Program 9.15
NaryTree Class Member Function Definitions
Program 9.16
BinaryTree Class Definition
Program 9.17
BinaryTree Class Constructor Definitions
Program 9.18
BinaryTree Class Purge Member Function and Destructor Definitions
Program 9.19
BinaryTree Class DepthFirstTraversal Member Function Definition
Program 9.20
BinaryTree Class CompareTo Member Function Definition
Program 9.21
Binary Tree Application-Postfix to Infix Conversion
Program 9.22
Binary Tree Application-Printing Infix Expressions
Program 10.1
SearchTree Class Definition
Program 10.2
BST Class Definition
Program 10.3
BST Class Left and Right Member Function Definitions
Program 10.4
BST Class Find and FindMin Member Function Definitions
Program 10.5
BST Class Insert, AttachKey and Balance Member Function Definitions
Program 10.6
BST Class Withdraw and DetachKey Member Function Definitions
Program 10.7
AVLTree Class Definition
Program 10.8
AVLTree Class Constructor, Height, AdjustHeight and BalanceFactor Member Function Definitions
Program 10.9
AVLTree Class LLRotation Member Function Definition
Program 10.10
AVLTree Class LRRotation Member Function Definition
Program 10.11
AVLTree Class Balance Member Function Definition
Program 10.12
AVLTree Class AttachKey and DetachKey Member Function Definitions
Program 10.13
MWayTree Class Definition
Program 10.14
MWayTree Class DepthFirstTraversal Member Function Definition
Program 10.15
MWayTree Class Find Member Function Definition(Linear Search)
Program 10.16
MWayTree Class FindIndex and Find Member Function Definitions (Binary Search)
Program 10.17
MWayTree Class Insert Member Function Definition
Program 10.18
MWayTree Class Withdraw Member Function Definition
Program 10.19
BTree Class Definition
Program 10.20
BTree Class Insert Member Function Definition
Program 10.21
BTree Class InsertPair Member Function Definition
Program 10.22
Application of Search Trees-Word Translation
Program 11.1
PriorityQueue and MergeablePriorityQueue Class Definitions
Program 11.2
BinaryHeap Class Definition
Program 11.3
BinaryHeap Class Constructor, Destructor and Purge Member Function Definitions
Program 11.4
BinaryHeap Class Enqueue Member Function Definition
Program 11.5
BinaryHeap Class FindMin Member Function Definition
Program 11.6
BinaryHeap Class DequeueMin Member Function Definition
Program 11.7
LeftistHeap Class Definition
Program 11.8
LeftistHeap Class Merge Member Function Definition
Program 11.9
LeftistHeap Class Enqueue Member Function Definition
Program 11.10
LeftistHeap Class FindMin Member Function Definitions
Program 11.11
LeftistHeap Class DequeueMin Member Function Definition
Program 11.12
BinomialTree Class Definition
Program 11.13
BinomialTree Class Add Member Function Definition
Program 11.14
BinomialQueue Class Definition
Program 11.15
BinomialQueue Class AddTree and RemoveTree Member Function Definitions
Program 11.16
BinomialQueue Class FindMinTree and FindMin Member Function Definitions
Program 11.17
BinomialQueue Class Merge Member Function Definition
Program 11.18
BinomialQueue Class Sum and Carry Member Function Definitions
Program 11.19
BinomialQueue Class Enqueue Member Function Definition
Program 11.20
BinomialQueue Class DequeueMin Member Function Definition
Program 11.21
Event Class Definition
Program 11.22
Application of Priority Queues-Discrete Event Simulation
Program 12.1
Set Class Definition
Program 12.2
SetAsArray Class Definition
Program 12.3
SetAsArray Class Constructor, Insert, Withdraw and IsMember Member Function Definitions
Program 12.4
SetAsArray Class Union, Intersection and Difference Operator Definitions
Program 12.5
SetAsArray Class Comparison Operator Definitions
Program 12.6
SetAsBitVector Class Definition
Program 12.7
SetAsBitVector Class Constructor, Insert, Withdraw and IsMember Member Function Definitions
Program 12.8
SetAsBitVector Class Union, Intersection and Difference Operator Definitions
Program 12.9
Multiset Class Definition
Program 12.10
MultisetAsArray Class Definition
Program 12.11
MultisetAsArray Class Constructor, Insert, Withdraw and IsMember Member Function Definitions
Program 12.12
MultisetAsArray Class Union, Intersection and Difference Operator Definitions
Program 12.13
MultisetAsLinkedList Class Definition
Program 12.14
MultisetAsLinkedList Class Union Operator Definition
Program 12.15
MultisetAsLinkedList Class Intersection Operator Definition
Program 12.16
Partition Class Definition
Program 12.17
PartitionTree and PartitionAsForest Class Definitions
Program 12.18
PartitionTree and PartitionAsForest Class Constructor and Destructor Definitions
Program 12.19
PartitionAsForest Class Find Member Function Definition
Program 12.20
PartitionAsForest Class Simple Join Member Function Definition
Program 12.21
PartitionAsForest Class Collapsing Find Member Function Definition
Program 12.22
PartitionAsForest Class Union-by-Size Join Member Function Definition
Program 12.23
PartitionAsForest Class Union-by-Rank Join Member Function Definition
Program 12.24
Application of Disjoint Sets-Finding Equivalence Classes
Program 13.1
StoragePool Class Definition
Program 13.2
Overloading operator new and operator delete
Program 13.3
SinglyLinkedPool Class Definition
Program 13.4
SinglyLinkedPool Class Constructor and Destructor Definitions
Program 13.5
SinglyLinkedPool Class Acquire Member Function Definition
Program 13.6
SinglyLinkedPool Class Release Member Function Definition
Program 13.7
DoublyLinkedPool Class Definition
Program 13.8
DoublyLinkedPool Class Constructor and Destructor Definitions
Program 13.9
DoublyLinkedPool Class Release Member Function Definition
Program 13.10
DoublyLinkedPool Class Acquire Member Function Definition
Program 13.11
BuddyPool Class Definition
Program 13.12
BuddyPool Class Constructor and Destructor Definitions
Program 13.13
BuddyPool Class Acquire Member Function Definition
Program 13.14
BuddyPool Class Release Member Function Definition
Program 13.15
Event Class Definition
Program 13.16
Simulation Procedure for Exercising a Storage Pool
Program 14.1
Solution Class Definition
Program 14.2
Solver Class Definition
Program 14.3
Solver Class Solve and UpdateBest Member Function Definitions
Program 14.4
DepthFirstSolver Class Definition
Program 14.5
DepthFirstSolver Class DoSolve Member Function Definition
Program 14.6
BreadthFirstSolver Class Definition
Program 14.7
BreadthFirstSolver Class DoSolve Member Function Definition
Program 14.8
DepthFirstBranchAndBoundSolver ClassDoSolve Member Function Definition
Program 14.9
Divide-and-Conquer Example-Binary Search
Program 14.10
Divide-and-Conquer Example-Computing Fibonacci Numbers
Program 14.11
Divide-and-Conquer Example-Merge Sorting
Program 14.12
Dynamic Programming Example-Computing Generalized Fibonacci Numbers
Program 14.13
Dynamic Programming Example-Computing Binomial Coefficients
Program 14.14
Dynamic Programming Example-Typesetting a Paragraph
Program 14.15
RandomNumberGenerator Class Definition
Program 14.16
RandomNumberGenerator ClassSetSeed and Next Member Function Definitions
Program 14.17
RandomVariable, SimpleRV, UniformRV and ExponentialRV Class Definitions
Program 14.18
SimpleRV, UniformRV and ExponentialRV Member Function Definitions
Program 14.19
Monte Carlo Program to Compute EQN
Program 15.1
Sorter Class Definition
Program 15.2
Sorter<T> class Swap and Sort Member Function Definitions
Program 15.3
Classes of Sorters
Program 15.4
StraightInsertionSorter<T> Class DoSort Member Function Definition
Program 15.5
BinaryInsertionSorter<T> Class DoSort Member Function Definition
Program 15.6
BubbleSorter<T> Class DoSort Member Function Definition
Program 15.7
QuickSorter Class Definition
Program 15.8
QuickSorter<T> class Recursive DoSort Member Function Definition
Program 15.9
QuickSorter<T> Class Main DoSort Member Function Definition
Program 15.10
MedianOfThreeQuickSorter<T> ClassSelectPivot Member Function Definition
Program 15.11
StraightSelectionSorter<T> Class DoSort Member Function Definition
Program 15.12
HeapSorter<T> Class Definition
Program 15.13
HeapSorter<T> Class PercolateDown Member Function Definition
Program 15.14
HeapSorter<T> Class BuildHeap Member Function Definition
Program 15.15
HeapSorter<T> Class DoSort Member Function Definition
Program 15.16
TwoWayMergeSorter<T> Class Definition
Program 15.17
TwoWayMergeSorter<T> Class Merge Member Function Definition
Program 15.18
TwoWayMergeSorter<T> Class DoSort Member Function Definitions
Program 15.19
BucketSorter Class Definition
Program 15.20
BucketSorter Class DoSort Member Function Definition
Program 15.21
RadixSorter Class Definition
Program 15.22
RadixSorter Class DoSort Member Function Definition
Program 16.1
Vertex Class Definition
Program 16.2
Edge Class Definition
Program 16.3
Graph and Digraph Class Definitions
Program 16.4
GraphAsMatrix Class Definition
Program 16.5
GraphAsLists Class Definition
Program 16.6
WeightedVertex and WeightedEdge Class Definitions
Program 16.7
Graph Class DepthFirstTraversal Member Function Definition
Program 16.8
Graph Class BreadthFirstTraversal Member Function Definition
Program 16.9
Digraph Class TopologicalOrderTraversal Member Function Definition
Program 16.10
Graph Class IsConnected Member Function Definition
Program 16.11
Digraph Class IsConnected Member Function Definition
Program 16.12
Digraph Class IsCyclic Member Function Definition
Program 16.13
Data Structures for Dijkstra's Algorithm
Program 16.14
Dijkstra's Algorithm
Program 16.15
Floyd's Algorithm
Program 16.16
Prim's Algorithm
Program 16.17
Kruskal's Algorithm
Program 16.18
Critical Path Analysis-Computing Earliest Event Times
Program 16.19
Critical Path Analysis-Finding the Critical Paths
Program A.1
Example of Pass-By-Value Parameter Passing
Program A.2
Example of Pass-By-Reference Parameter Passing
Program A.3
Complex Class Definition
Program A.4
Complex Class Constructors and Destructor
Program A.5
Complex Class Accessors
Program A.6
Complex Class Mutators
Program A.7
Derivation and Inheritance in C++
Program A.8
Point and GraphicalObject Class Definitions
Program A.9
GraphicalObject Class MoveTo and Erase Member Function Definitions
Program A.10
Circle, Rectangle and Square Class Definitions
Program A.11
Stack Template Definition
Bruno
Copyright © 1997 by Bruno R. Preiss, P.Eng. All rights reserved.

Comentarii

Postări populare de pe acest blog

program principal cpp

#include "clasa.h" #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define DELAY 9000000 void delay() { for(long i=0;i<DELAY;i++); } //constructor cu initializare de la tastatura BigInt::BigInt() {char x; signed char t[400]; int i; printf("\nNumarul cu semn "); do s=getche(); while((s!='+')&&(s!='-')); n=0; do {x=getche(); t[n]=x-'0'; n++; } while((x>='0')&&(x<='9')); n--; for(i=0;i<n;i++) nr[i]=t[n-i-1]; } //constructor cu initializare prin parametri BigInt::BigInt(char semn,signed char numar[],int dim) {int i; s=semn; n=dim; for(i=0;i<n;i++) nr[i]=numar[n-i-1]; } //transform un int negativ in pozitiv int BigInt::Pozitiv(int x) {int a,vb; a=0; vb=0; while(vb==0) if((x+a)==0) vb=1; else a=a+1; x=a; return x; } //constructor dintr-un nr int obisnuit BigInt::BigInt(int x) {int i; if(x>=0) s='+'…

NUMERE PRIME ALGORITM C++

// NUMERE PRIME ALGORITM C++//  reediting from scratch //on this page is just the study for a next algoritm for generating the parime nr series like Fibonnaci or ....if possibile

74111121313417374414124343447 if u know the red part you can generate the orange part
1 0 1 111112222 1 1 23

o aplicatie php localitati romania

//APLICATIA SE REFERA LA BAZA DE DATE SIRUTA

//dragtable.js


/* dragtable v1.0 June 26, 2008 Dan Vanderkam, http://danvk.org/dragtable/ http://code.google.com/p/dragtable/ \Bsortabledraggable\B Instructions: - Download this file - Add <script src="dragtable.js"></script> to your HTML. - Add class="draggable" to any table you might like to reorder. - Drag the headers around to reorder them. This is code was based on: - Stuart Langridge's SortTable (kryogenix.org/code/browser/sorttable) - Mike Hall's draggable class (http://www.brainjar.com/dhtml/drag/) - A discussion of permuting table columns on comp.lang.javascript Licensed under the MIT license. */ // Here's the notice from Mike Hall's draggable script: //***************************************************************************** // Do not remove this notice. // // Copyright 2001 by Mike Hall. // See http…