I need to traverse a LinkedList a number of times, in a way that suggests using ListIterator.
Is there a way to reset a ListIterator? or is it better to just create a new one? (and what if I can't because I don't have access to the list?)
edit: and is there a way to create a ListIterator that points to the end of the list? (so that has...
Hello,
I want to read a book on Data Structures and Algorithms, but i would like to know if there is any specific topic in Discrete Mathematics considered very important as a prerequisite in order to understand the materials presented in Data Structure Book.
Thank you in advance for your help
P.S i am self-thought programmer, i didn't...
Is there a c/c++ implementation of sparse voxel representation for any 3D point cloud dataset?
...
I'm not generally a GUI programmer but as luck has it, I'm stuck building a GUI for a project. The language is java although my question is general.
My question is this:
I have a GUI with many enabled/disabled options, check boxes.
The relationship between what options are currently selected and what option are allowed to be select...
What Data Structure could I use to find the Phone number of a person given the person's name?
...
Is it possible to recieve only the structure of the table even if its emtpy and put the field names in an array. if so wich sql command makes that possible.
thanks
Matthy
...
Background
Assume I have the following nested variable in PHP.
$data = Array(
Array('lname' => 'Simpson','fname' => 'Homer','age' => '35','motto' => '_blank_'),
Array('lname' => 'Simpson','fname' => 'Marge','age' => '34','motto' => '_blank_'),
Array('lname' => 'Flintstone','fname' => 'Fred','age' => '33','mo...
Given a stack S, need to sort the stack using only Push, Pop, Top, IsEmpty, IsFull.
Looking for most simple solution.
Edited: Removed in place condition. Can't use another stack or queue.
...
I'm reading a lot about vocabulary trees when it comes to fast queries for similar images or texts in big databases. But I couldn't find any good (easy to unserstand) description on what such an vocabulary tree is and how to build one out of features.
...
int x[10],y[10];
x = y;
I am thinking of a simple hack, which would enable me to get this effect.
...
For example, given a str of "Stackoverflow is for every one" and remove of "aeiou",
the function should transform str to "Stckvrflw s fr vry n".
I have one char array of string: str[] and one char array of chars to be removed:remove[]
My Solution: Loop str[] looking for each in character in remove[]. Shift str[] one place left every-t...
Given two sorted linked lists, L1 and L2, a solution to compute their
intersection L1 intersection L2.
...
As part of a research project I'm currently looking for open-source implementations of self-indexing algorithms, i.e. a compressed form of the traditional inverted index yielding nice characteristics such as faster lookup and/or less consumed space.
Do you know of any open-source implementations of self-indexing algorithms? Do you have ...
Hi All,
I moved from Php to java. I am not much familiar with java power. I have couple of questions.
1 - I am reading a directory and that directory has more than 500 files. I am storing file names and contents in hashmap. Please tell me is it good for speed (performance)? If no which other data structure I can use?
2 - I am using ab...
Greetings code-gurus!
I am writing an algorithm that connects, for instance node_A of Region_A with node_D of Region_D. (node_A and node_D are just integers). There could be 100k+ such nodes.
Assume that the line segment between A and D passes through a number of other regions, B, C, Z . There will be a maximum of 20 regions in betw...
Hi,
I want to write some sort of dictionary that would accept current time
and return what user-define time period it is. As time-preiod I mean user-defined names for time period that are read from file. For example
8:00-9:00 - breakfast time
9:00-12:00 - work time
12:00-13:00 - lunch time
etc...
Currently I have a function is base ...
I would like code like this:
(define-struct thing (a b c))
(define th (make-thing 1 2 3))
to print something like this:
(make-thing 1 2 3)
when I type "th" into either the DrScheme or MzScheme repl. I am using the language "pretty big" in DrScheme with output style set to "constructor". This is what I get in DrScheme:
(make-thin...
Hay Dear!
i know that if statement is an expensive statement in c++. I remember that once my teacher said that if statement is an expensive statement in the sense of computer time.
Now we can do every thing by using if statement in c++ so this is very powerful statement in programming perspective but its expensive in computer time pers...
hey, following problem here: i have table with persons that have one location, if i delete the location for the location table, i don't wont to lose the assigned persons. ive a entry in the location with the id=1 and the name is: "No location". and that what I'm trying to do, but i fail!
ALTER TABLE `persons`
ADD CONSTRAINT `persons_i...
How can I construct a tree given its inorder and preorder traversal?
I am just looking for an efficient algorithm.
...