Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
144 views

Print the App Name Using Latest Version

I am trying to solve a problem, where we are given an app name, service name, and version number of an api. We need to print the name of app, which is using the latest version for most of the service. ...
vikash srivastava's user avatar
8 votes
3 answers
3k views

Moving elements satisfying a predicate from one container to another

I've implemented a C++ algorithm that moves elements satisfying a given unary predicate from one container into the other, deleting them from the input container. This is my implementation: ...
CrushedPixel's user avatar
5 votes
2 answers
436 views

Find maximum value of Point represented by an Array of values for each coordinate

Suppose there is an array A = {3,2,5}, then points for this array correspond to indexes (i,j) where ...
ripudamanrs's user avatar
1 vote
3 answers
152 views

Diffing two lists of business objects

dataListOne and dataListTwo will be full of BO objects (around 4000 - 5000). Lets say ...
Koray Tugay's user avatar
  • 1,547
6 votes
3 answers
9k views

Find a prefix of a query string in the values of a Map

I have a hash map which maps to some strings which serve as prefixes and are of small length (max length is 6): ...
Jim's user avatar
  • 239
6 votes
1 answer
1k views

Efficient top k words using MultiMap (Google Guava ext lib JAR)

Basic algorithm: Open document/huge text file Use Map and List to separate the words. \$O(K)\$ time complexity (TC) considering ...
JustVirtually's user avatar
11 votes
4 answers
6k views

Collection with both Set and List interface

Here's something I wrote a while ago. I needed a collection that was ordered, but also guaranteed duplicates did not occur. So I made a class with both Set and List interfaces. It seems to work ...
markspace's user avatar
  • 522
8 votes
1 answer
116 views

Joining collections... because it's fun

I'm working on a LinqEnumerable class (reviewable here), and I'm no Big-O expert and I'm pretty bad with algorithms, so I wonder what the complexity is for what I'...
Mathieu Guindon's user avatar
5 votes
3 answers
486 views

Finding the closest value in a collection in a game-server plugin implementation

I have an array of a instances of an enum type. A random double variable is initialized with a value between 0.... to 1, and should be used to get the closest value'...
user3123545's user avatar
10 votes
3 answers
821 views

More imitation of Enumerable in VBA

I was inspired by Me How's question to see how far I could push an imitation of .Net's Enumerable Class. The new functions can obviously handle Collections, but can also handle any collection-type ...
RubberDuck's user avatar
  • 30.9k
3 votes
2 answers
3k views

Inverting index structure in C++

I am trying to create an invert index structure in C++. An invert index, in this case, refers to image retrieval system, where each invert index refers to a numbers of "Patch ID". (simply called "ID" ...
Karl's user avatar
  • 373
1 vote
1 answer
321 views

Displaying plotted data in serpentine order

I have to display some set of: Data in serpentine order. In an experiment there are replication, range, and plot. Replications contains range a plot. A range contains a plot. If there are 2 ...
VIckyb's user avatar
  • 665
3 votes
1 answer
678 views

Intersection-detection algorithm

This is an intersection-detection algorithm I developed as an alternative method to the one developed for my coursework. I won't post some of the other functions as they are used in the coursework too,...
user avatar