I have some homework for my school and I have to make a snake game, like Nokia's, in Delphi. I wonder which solution is the best. I want my snake be a class and the body is an array of points (parent class) or a linked list of points. What's the best? An array or a linked list?
...
HAi
I am preparing for an exam where i couldn't understand the convertion of infix notation to polish notation.
for the below expression
(a–b)/c*(d + e – f / g)
Can any one tell step by step how the given expression will be converted to prefix.
thank you
...
Given a string of numbers say "5556778", and a num N(say 2), rearrange the string such that numbers in any continuous block of size N are unique.
e.g: for the above string and N=2, one rearrangement can be 5657578.
For N=3: 5765785
find the arrangement in linear time.
...
I'm thinking about using something like:
<script src="http://www.example.com/?key={"param":"value"}">
As you can see in the example above a JSON formatted string is being passed over the src URL. The example, of course, doesn't work because both the JSON string and the script tag use double quotes.
Here are a few solutions that I ...
Possible Duplicate:
B- trees, B+ trees difference
What are the advantages/disadvantages of BTree+ over BTree? When should I prefer one over other? I'm also interested in knowing any real world examples where one has been preferred over other.
...
Hi,
I wanted to know meaning of dynamic linked data structure? Please give some example.Which data structures can be classified as static linked data structures and which can be classified as dynamic linked data structures ?
Thanks.
...
I was reading about Judy Trees and would like to see examples of real world usage and comparisons to other data structures.
...
Hi there,
I am currently working on a little application:
The structure follows in some way the MVC pattern.
For short it has the basic things, Models, Controllers etc.
Now I am sitting here and do not know whether :
1.
The SQL database is only managed by a model through methods the programmer gives him like: "Hey we have name reco...
Hi, so I need to write an efficient algorithm for looking up words with missing letters in a dictionary and I want the set of possible words.
For example, if I have th??e, I might get back these, those, theme, there.etc.
I was wondering if anyone can suggest some data structures or algorithm I should use.
Thanks!
EDIT: A Trie is too ...
I am applying the all-pairs shortest path algorithm (Floyd-Warshall) to this directed graph:
The graph is represented by its adjacency matrix. The simple code looks like this:
public class ShortestPath {
public static void main(String[] args) {
int x = Integer.MAX_VALUE;
int [][] adj= {
{0, 6, x, 6, 7},
...
I have a hash table that I want to store to disk. The list looks like this:
<16-byte key > <1-byte result>
a7b4903def8764941bac7485d97e4f76 04
b859de04f2f2ff76496879bda875aecf 03
etc...
There are 1-5 million entries. Currently I'm just storing them in one file, 17-bytes per entry times the number of entries. That ...
Is there someplace where I can get a Big-O style analysis / comparison of traditional data structures such as linked lists, various trees, hashes, etc vs. cache aware data structures such as Judy trees and others?
...
Is there any method I can send to an object, which will return an enclosing collection (NSDictionary/NSArray)? Or a method which would return a collection of all the objects with a retain call on the object in question?
DJS.
@bburn:
It possibly is a design problem. I'm trying to parse an XML document, and more or less convert the entir...
Is there something like a two sided list in Java? Maybe a third party implementation?
Here a little example to demonstrate what I have in mind.
Original state:
A: 0-1-2-3
| | | |
B: 0-1-2-3
After removal of element 1 in B:
Null
|
A: 0-1-2-3
| / /
B: 0-1-2
The data structure must be accessible from both sides. So...
I'v always wondered this. In a game like GTA where there are 10s of thousands of objects, how does the game know as soon as you're on a health pack?
There can't possibly be an event listener for each object? Iterating isn't good either? I'm just wondering how it's actually done.
...
How to delete a node in a singly link list with only one pointer pointing to node to be deleted?
[Start and end pointers are not known, the available information is pointer to node which should be deleted]
...
Hello
Merry Xmas
List<string> list = new List<string>();
list.Add("A");
list.Add("B");
List<string> list1 = new List<string>();
list.Add("a");
list.Add("b");
for (int i = 0; i < list.Count; i++)
{
// print another list items.
for (int j = 0; j < list1.Count; j++)
...
First of all, I am a beginner programmer (still much to learn).
In one of my small school projects I have written a stack for a struct . Now I have a slightly different struct and I need a stack for this one too.
Should I write another data structure [stack] (very similar to the initial one), or try to achieve some generic programming.....
Like phpMyAdmin has to be installed as a web application to work with MySQL databases, is there a downloadable program that can connect to a remote MySQL server to create, read, update and delete databases, tables, columns and rows?
...
I currently work with PHP and Ruby on Rails as a web developer. My question is why would I need to know algorithms and data structures? Do I need to learn C, C++ or Java first? What are the practical benefits of knowing algorithms and data structures? What are algorithms and data structures in layman’s terms? (As you can tell unfortunat...