Can anyone help me with a data structure?
153362
You need to look into "balanced trees". Check out any good algorithms book - my personal favourite is "Algorithms" by Robert Sedgewick.\n\nHope this helps!\n\n-----------\nEdit:\nBinary tree will not work as they have O(n) worst cases for maximum, minimum, search, insert and delete. These pathological cases are avoided by the rebalancing techniques used in balanced trees.
980139
the way you store ur data.e.g. array,list,tree,queue
782737
In computer science, a data structure is a way of storing data in a computer so that it can be used efficiently. Often a carefully chosen data structure will allow a more efficient algorithm to be used. The choice of the data structure often begins from the choice of an abstract data structure. A well-designed data structure allows a variety of critical operations to be performed, using as few resources, both execution time and memory space, as possible. Data structures are implemented using the data types, references and operations on them provided by a programming language.\n\nDifferent kinds of data structures are suited to different kinds of applications, and some are highly specialized to certain tasks. For example, B-trees are particularly well-suited for implementation of databases, while routing tables rely on networks of machines to function.\n\nIn the design of many types of programs, the choice of data structures is a primary design consideration, as experience in building large systems has shown that the difficulty of implementation and the quality and performance of the final result depends heavily on choosing the best data structure. After the data structures are chosen, the algorithms to be used often become relatively obvious. Sometimes things work in the opposite direction - data structures are chosen because certain key tasks have algorithms that work best with particular data structures. In either case, the choice of appropriate data structures is crucial.\n\nThis insight has given rise to many formalised design methods and programming languages in which data structures, rather than algorithms, are the key organising factor. Most languages feature some sort of module system, allowing data structures to be safely reused in different applications by hiding their verified implementation details behind controlled interfaces. Object-oriented programming languages such as C++ and Java in particular use classes for this purpose.\n\nSince data structures are so crucial to professional programs, many of them enjoy extensive support in standard libraries of modern programming languages and environments, such as C++'s Standard Template Library, the Java API, and the Microsoft .NET Framework.\n\nThe fundamental building blocks of most data structures are arrays, records, discriminated unions, and references. For example, the nullable reference, a reference which can be null, is a combination of references and discriminated unions, and the simplest linked data structure, the linked list, is built from records and nullable references.\n\nThere is some debate about whether data structures represent implementations or interfaces. How they are seen may be a matter of perspective. A data structure can be viewed as an interface between two functions or as an implementation of methods to access storage that is organized according to the associated data type.
849879
here you go...\n(it'll work with up to 255 different disks, if you need more, you'll have to replace chars with ints)\n\nm1(char *a,b) {memove(b+1,b,strlen(b)+1); *b=*a; memmove(a+1,a, strlen(a);}\nm(char *a,b,c) {if (*a)  {m(a+1,b,c);m1(a,c);m(b,c,a);}
32306
A storage unit that is organized by a specific name on a computer
195503
There is no structure in Java.\n\nProbably you are confusing with C++>
704069
Your link does not work but I assume you are asking about the memory for addresses section. That's the hardest part. First of all you will be given several practice tests on this section  so your memorization time will be well over 5 minutes. \n\nThink of a word association that corresponds to blocks A-E.  Try to learn only the streets that aren't broken. Eggs are better with cherries is an example. Answer those questions first and then go back to see if you can get the block ranges correct.  Don't guess but do take some practice tests from a book from a library.
1159892
Sequential search:\n\nhttp://cprogramming.com/discussionarticles/sorting_and_searching.html
218696
There may be some good theory on this topic, but\nI'd like to point out one obvious solution and\none possibly-special-case solution.\n\nFirst, given a graph, if you have the ability to \ntraverse the entire graph and "mark" each node as\nyou visit it, then if you ever run into a marked\nnode, then there is a cycle.  The most obvious way\nto mark a node is to store a flag in it, but it\nis also possible to build a separate data structure\nto keep track of each node (ie. a hash table \nindexed by node address or something like that.)\n\nAnother trick I've seen used on lists, but *might* be\ngeneralized to some more-complicated graphs, is the\nidea of a follow-pointer.  In the case of a list,\nthe "follow pointer" traverses one list link\nfor every *two* that the real traversal covers.\nIf there is a loop in the list, eventually the\n"lead" pointer will wrap around and catch up\nto the "follow" pointer.  Thus, you know that\nthere's a cycle if the two pointers ever refer\nto the same node.
447556
Look up "quicksort".\n\nIt fits very naturally into a recursive implementation\nand is also a very efficient sorting algorithm.\n\nI've included a link to the Solaris source for quicksort.\nIt is written in C (rather than C++).  It is somewhat\ncomplicated because it optimizes the sorting of\nshort sequences by switching to an insertion sort.\nHowever, you could implement a simpler version which\nran quicksort all the way to completion.
859662
This sounds like an assignment! Anyhow...\nCreate an array of 10. Then create a for loop of ten and each time ask for the user for an input. Store that input to the array. Then using a loop again output the array to the listbox
326729
nested loops and if..then jump\n\nfor I = 1 to 42\nfor J = I+1 to 43\nfor K = J+1 to 45\nfor L = K+1 to 47\nfor M = L+1 to 48\nfor N = M+1 to 49\nif K-I=2 or L-J=2 or M-K=2 or N-L = 2 then [skip next line]\nprint I,J,K,L,M,N\nnext\nnext\nnext\nnext\nnext\nnext\n\nSomething like that;\nTranslate into your language's syntax
526760
go to the source - The Art of Computer Programming by Donald Knuth.  It is the bible of data structures.
463630
I think you're trying to do it the hard way...how about simply traversing the binary tree sequentially and adding each node to the linked list.  \n\nThe binary tree will not readily have a sequential read capability so you need to know the range and smallest increment of the elements.  This one, however, is stated to have "Sequential storage."\n\nThe linked-list will already have an insert-into-list method or it couldn't be a linked list from a working list class.\n\n\nyour algorhithm will have a loop starting with an enf of file check against the binary read and use the insert method of the linked-list until EOF...that's all.  A single loop with a binary read, a write and a check for EOF::\n\npseudocode:\nbinary::readfirst\ndo until eof\n  link::insert\n  binary::readnext\nend do\n\nwasn't that simple?
151527
declare array e.g\n\nchar a[]={'1','2','3','x','y'};\n\nthere is no other functions to do it ansi C.\nu have to put it in an array. then its a string.
203290
Change this:\n\nsArray(0)="dog"\n\nTo this:\n\nsArray[0]="dog"
59731
Try the Java reference library.  Here is a link to it online: