I need an idea for an efficient index/search algorithm or datastructure for a particular problem. So far I could not come up with something fast and elegant...
Consider a huge collection of ... |
I have a situation whereby I'm populating an ArrayList with "TransactionEvent"s. TransactionEvent has a property "transaction ID". In the large majority of cases each new event has a transaction ... |
I am supposed to create an iterative method stretch that takes a positive number n as a parameter and returns a new ListItem beginning a list in which each of the ... |
I need to pick a random element from a list, that fulfills certain condition. The approach I've been using works, but I'm sure is not every efficient. What would be the ... |
There are many naive approaches to this problem, but I'm looking for a good solution. Here is the problem (will be implemented in Java):
You have a function foo(int a, int b) ... |
I have to write a method that returns a linked list with all the nodes that are common to two linked lists using recursion, without loops.
For example,
first list is 2 ... |
I am looking for an efficient data structure to represent a priority list. Specifically I need to assign a priority to a set of items and return only the top scoring ... |
|
I am writing a Graph library that has both adjacency list and matrix implementations. Here is some code I came across in a Java data structures textbook:
static void floyd(Graph<V,E> g)
// ...
|
How to, Sequentially distribute data from a list to arrays (or some other structure) of fixed size/weight.
For example, lets say I have a list of 10 elements. I want to sequentially ... |
I have some code doing this right now. It works fine with small to medium sized lists, but when I have a list of size n > 5000 then the my ... |
I have a graph (implemented with Vector) of LinkedLists and I want to connect the LinkedLists that do not share any common elements. I think the way I do it right ... |
I'm trying to generate a list of non-repeating alpha-numeric codes. They will be generated in batches and in volumes such that it won't be feasible to explicitly look at what has ... |
How can I take n random elements from an ArrayList<E>? Ideally, I'd like to be able to make successive calls to the take() method to get another x elements, without ... |
Here's what I am trying to do:
Given a list of names, print out all
combinations of the names taken three
at a time. If the list ... |
Given two Lists, each list holding the same object type, I would like to find objects between the two lists that match, based on some property values.
e.g. an object from List1, ... |
Stuck on homework:
I need help making this Algorithm!!!
Algorithm: Locates an element in a list of increasing integers by successively splitting the list into four subsets of equal (or close ... |
I have a list of items and set of users. Users can re-order list items. Each user has his own view for the list, he can arrange the items in his ... |
As you may have understood with the title, I need some smart thinking here :)
I have a List<List<Object>> object. If you think of the Object objects as integers, you could see ... |
I'm trying to slice a list (call this input list & it contains Java double data type elements) in multiple parts (sub lists). The size of the sub lists can be ... |
How would you suggest going about implementing the following scenario. I have a few thoughts, but none that satisfies my problem in totality, so I would like to get your input.
I ... |
I have 2 lists with same Object type.
List A [ foo, bar, moo, woo, pee ]
List B [ bar, woo ]
I want to compare those 2 lists and if the name ... |
Can anyone point out where I've gone wrong here? I stepped through it with a debugger and it looks like my algorithm should be finding the search key, but its not. ... |
I want to apologize for my english because I'm French.
Let's say the List b is a LinkedList.
Let's say the List a is also a LinkedList.
How do I append these list in ... |
I have four lists of recommendations and lets say the lists are A,B,C,D.
Every list has the same number of items and are represented as key-value pairs. But I need to give ... |
My company's cat-herding application tracks a convoy of cats. Periodically, it needs to compare previousOrder to currentOrder (each is an ArrayList<Cat>) and notify the cat-wranglers of any changes.
Each cat is ... |
I have a list of article names which are strings, and based on a user query, I need to output a best search out of that list of article names. I ... |
So yes, I read about how edit distance can be used between strings to decide how "close" are two string to each other. This algorithm, implemented as a Dynamic problem takes ... |
I'd like to create a list of tuples from each value within a set of lists. The set of lists can be open, but for the example I have the following ... |
Given a List of items of different types, how do I efficiently separate those, so each group only contains item of the same type?
More details
In java, I have a List ... |
I saw an earlier post which is trying to do a similar sort of thing in Python.
Here is a boiled down example of what I want. Let us say ... |
I have a List of elements (1, 2, 3), and I need to get the superset (powerset) of that list (without repeating elements). So basically I need to create a List ... |