Results for "Category: Data Structures"
**UPDATED** This function will parse your favorite XML and RSS news feeds in a nice format. Only one variable to set up and easy to integrate and modify. Tested on several sources. Let me know this has been useful. Comments and suggestions are very much appreciate it. **Please Vote**
This is simple example of doubly linked list. You can insert/delete items anywhere in the list.
This program covers character arrays, structures, and unions - three VERY powerful features of C++. The first part, character arrays, explains and demostrates the use of the [] operators when dealing with strings. The second part, structures, demostrates the use of structures in real-world applications and defines the differences/similarities between structures and classes. The third and final part, unions, identifies the word 'unions' as a keyword, shows how their used and gives a copy-and-pastable example.
The following code, when running, looks like the text is actually typing itself. This technique uses two main things, char arrays and the Sleep(); function. This technique would be great to use for slash screens, presentations or just impressing your friends! Also, please take the time to vote for my code. Thanks!!
Introduction to C++ STL vector - a C++ standard class that acts similarily to a C array. No 3rd party classes, this is all standard among every standards compliant C++ compiler! The major benefit to the vector is that it is dynamic in size. You can add to it, remove from it, and not have to worry about handling the memory yourself. Very useful.
This tutorial will walk you step by step on how to create and manage classes in PHP.
Ok, I ran into a problem, MS out of some odd wisdom didn't do as you would think with the defaultvalue of a data column. you would think it so simple right? In a database such as SQL server you can set the default value to a function, I can do this with a datacolumn too such as. column1.defaultvalue = system.guid.newguid Though this has an issue, if you use this in a grid you will see as you add new rows that the darn guid is the same. It's calling the newguid only once when setting up the table and it's holding that value static for the rest of the life of the datatable\datacolumn. This goes against common knowlege in how MS does things in other area's, such as the before mentioned SQL server using NewID() will get you a new ID each time. Keep in mind that even other funtions like Now() (which returns current date time) won't work, the defaultvalue will always be the same datetime. So I don't have a solution for the default, I have a different solution. Custom datatable and custom datacolumn classes. You will see in my custom column style that there is a new property called (autogenerateguid)if set to true then it will then set each new row with the correct new guid. Though this is all code based, it works for what I need it to do. It also features the use of an un-documented function and class. NewRowFromBuilder Function System.Data.DataRowBuilder Class I've seen other post's that show to use the rowchanging or positionchanged events in order to do the same thing, this example gets to the source of the newrow creation. What would be better is that if you assign a function that MS would call that function each time instead of this lame static method.
This is a linked list program that allows you to add nodes to the front, end, and a specified place in the list. You can also delete nodes from the front, end, specific, and/or all node that are the same.
THis is a scheduling algorhim simulator very cool
I hope that this code will be helpful to those (specially the beginners) who want to know about using linked lists. This is actually a very simple program which shows the basic linked list operations like insertion, deletion, searching, modifying and traversing. Any queries related to this code is very welcome. Tell me if this piece of code was useful to you !!
This BST code will be useful to everyone who wants to know about the basic operations of a BST like Insertion, Deletion, Make Empty, Find Minimum, Find Maximun, Search, Traverse Ascending, and Traverse Descending. Do leave some comments on this code!!
in recursion we have limited stack to keep data. so when we try to find the solution of tower of honai for 5, we get in trouble. to solve this problem we've non recursive solution of it.
Implementation of Arraylist collection, Listbox and Serialization
Data and File structure Programs Program Set 1 ------------------------------------------------- 1. Perform the following operations on an array: (a) insert (b) delete (c) merge (D) Delete multiple occurrences of a number ------------------------------------------------- 2. Create a stack using static memory allocation ------------------------------------------------- 3. Create a queue using static memory allocation ------------------------------------------------- 4. Create a circular queue ------------------------------------------------- 5. Create a singly linked list and perform the following operations: (a) insert (b) delete (c) merge (d) sort (e) union (f) intersection (g) reverse ------------------------------------------------- 6. Create a stack using dynamic memory allocation ------------------------------------------------- 7. Create a queue using dynamic memory allocation ------------------------------------------------- 8. Represent a polynomial in terms of a singly linked list, and then add two three variables polynomials ------------------------------------------------- 9. Create a doubly linked list ------------------------------------------------- 10. Create a circular linked list ------------------------------------------------- 12. Create a double-ended queue (Dequeue) with the following operations: (a) insert in the beginning (b) insert in the end (c) delete from beginning (d) delete from end Hint: Use doubly-link list ------------------------------------------------- 13. Create a Priority Queue with the following operations: (a) Insert (b) DeleteMin() / deleteMax---depending on the heap ------------------------------------------------- Program Set 2 ------------------------------------------------- 1.Trace the following set of nos using quick sort and bubble sort. Which of the sorting method is more efficient? 9, 11, 1, 5, 10, 45, 3, 8, 18 ------------------------------------------------- 2. Code for finding a no in a binary search tree and displaying its level where it is found (root is at zero level) ------------------------------------------------- 3. Code for traversing a binary tree in inorder iteratively ------------------------------------------------- 4. Code for interchanging the left and right subtrees of a binary tree ------------------------------------------------- 5. Code for counting the leaves(node having no subtree) of the tree Note: Q-2 to Q-5 are to be implemented practically also. ------------------------------------------------- 6. Heap Sort -------------------------------------------------
The code is for creating adding deleting and printing
Code reads an array and writes array's php code to a file.
[Please rate my code.] This helps to maintain a book-list in a small library. The book information contains the title, author, publish year, and ISBN code. The information will be given to you in a text file books.txt. Each line of the file contains data about books. (For more information about this, look at the books.txt file in the zip file) It provides functions to: - add a book - delete a book based on the ISBN code or title - search for a book based on the ISBN code - list all books - list every books written by a specific author It also provides an easy way for users to select a command from a command menu to perform the above functions and to input data from the keyboard. The "books.txt" file is used to initialize the list.
You can learn Pointer & Link List easily. Familiar with Link List
learn all about a single linked lists (adding and deleting nodes). Sorting works but it is not sorting the linked list itself but sorting array then transfering back into linked list.
This code implements a simple class, wich stores and manages some basic data(name, address and telephone). It also saves and opens data using serialization :-). Uses a MDI form with toolbar and menuitems to navigate the different options.