/r/datastructures

Photograph via snooOG

What's better than one data structure? Two data structures.

Let's discuss the latest hip and fashionable data structures and conjectures about them:

cache trees, skip-splay trees, the world is our data oyster.

/r/datastructures

7,950 Subscribers

8

Top data entities based on multiple criteria

Hey, I am playing with some CS use case and I need a little bit help or confirmation.

I am having a list of data entities which can be compared between each other by multiple criteria. What I need is to expose an interface that allows you to get the top entities by a single or multiple criteria (all or a subset).

In my current prove of concept, the data entities live in a hash table and I have multiple priority queues in the form of balanced binary trees for each individual criteria. For simplicity, lets say that each entity exists in each priority queue. So far so good, I know the top entities for each individual criteria.

What I am still missing is a way to get the top results by multiple criteria. I am thinking about a weight function that can be used to compute a new single priority queue where the input is multiple priority queues (representing the different criteria).

The way I was considering to "merge" the priority queues is by computing a normalized weight for each criteria and for each entity, i.e. multiple weight per entity for each of the criteria. Then to compute a single normalized weight for each entity as a function of the individual entity weights.

It would probably work if I handle the corner cases like 0 weight and such but for some reason it doesn't feel like the right approach and rather like I am reinventing the wheel for an already known issue.

Do you have some better ideas on what structure I could use for prioritizing entities by multiple criteria? Or if the multiple priority queues approach is fine, do you have a better idea how I could merge them info a single priority queue when each entity exists in each of the individual queues?

1 Comment
2021/12/28
12:17 UTC

22

Looking for a partner in Competitive Programming in C++

Hello everyone ,I am a cs undergraduate .I am looking for a partner in Competitive Programming in C++ to solve codeforces problems together and enhance problem solving skills together .If anyone is interested message me or comment below . Language of discussion will be English.

60 Comments
2021/12/26
15:58 UTC

0

data structure

J'ai besoin de quelqun qui est bon avec les structures de donnees et algorithme.

Binary search tree, AVL, graphes, dictionnary, complexity algorithms, pile file, min heap, max heap.

Hmu as soon as possible. Speaking french is required.

Thank you

1 Comment
2021/12/21
09:25 UTC

0

DATA STRUCTURE

J'ai besoin de quelqun qui est bon avec les structures de donnees et algorithme.

Binary search tree, AVL, graphes, dictionnary, complexity algorithms, pile file, min heap, max heap.

Hmu as soon as possible.

Thank you

0 Comments
2021/12/21
09:25 UTC

4

Graph Method

Adjacency List or Adjacency matrix which one to follow for solving problems ? Any suggestions are welcomed

4 Comments
2021/12/11
18:02 UTC

1

Can you find the last person of age K?

1 Comment
2021/12/05
10:04 UTC

1

Hoe many can you solve?

0 Comments
2021/12/04
16:54 UTC

2

Try out the following questions

0 Comments
2021/12/03
13:52 UTC

1

Join the telegram channel - free coding solutions

0 Comments
2021/12/03
11:55 UTC

1

Closest Number

0 Comments
2021/12/03
11:46 UTC

1

Take up this string challenge

0 Comments
2021/12/03
08:28 UTC

1

Postorder if inorder and preorder are given

1 Comment
2021/12/03
06:43 UTC

1

Well, see how powerful this number is

0 Comments
2021/12/03
02:37 UTC

1

Help the company manager find sales data of ...

0 Comments
2021/12/02
19:21 UTC

1

Calculate cost

0 Comments
2021/12/02
16:56 UTC

1

Find kth smallest element in cross sequence

0 Comments
2021/12/02
12:59 UTC

0

Help Jackson

0 Comments
2021/12/02
10:08 UTC

1

Help the cricket captain solving this problem

0 Comments
2021/12/02
07:29 UTC

0

Well, how to reverse linked list in groups of K

1 Comment
2021/12/02
06:53 UTC

0

Zlatan and tricks

0 Comments
2021/12/02
06:18 UTC

1

Participate in this coding marathon

0 Comments
2021/12/02
04:03 UTC

2

For people interested in DSA problem solving

0 Comments
2021/12/01
17:47 UTC

1

Find largest, second largest and average without sorting the array

1 Comment
2021/12/01
17:32 UTC

1

Can you find the kth smallest element in the cross sequence

0 Comments
2021/12/01
11:25 UTC

5

Array Challenge

1 Comment
2021/12/01
07:46 UTC

0

Try solving this in the most optimal way(time as well space)

1 Comment
2021/11/30
19:53 UTC

3

Try solving these - asked in latest screening tests

This is a list of 4 5 questions that were asked in some of the companies lately

Have a look and see if you can solve these

https://www.wellhow.online/search/label/practice

Thanks

0 Comments
2021/11/30
16:32 UTC

0 Comments
2021/11/30
07:09 UTC

1

Well, how can you find the Nth node from end of a linked list using two pointer approach

Checkout here

https://www.wellhow.online/2021/11/well-how-to-find-n-th-node-from-end-of.html

Also do let me know if you want to cover specific stuff

0 Comments
2021/11/30
04:43 UTC

3

DSA daily series

0 Comments
2021/11/29
06:49 UTC

Back To Top