Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7934607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:41:34+00:00 2026-06-03T21:41:34+00:00

basically i need some algorithm that fits into the following problem: i have 5

  • 0

basically i need some algorithm that fits into the following problem:

i have 5 lists: 10, 30, 40, 40 and 50 elements each
there is a cap of 80 elements
what i want to achieve now, is this:
3 lists: 10, 80 and 80 elements

40 and 40 merge to 80 and 30 and 50 merge to 80, the list with 10 elements is left as the third resulting list
meaning i want to somehow merge all lists, but with a cap of 80 elements, so i really only have as many lists as i really need

this is not a question of sorting but only to merge
it is not possible to split lists up, the elements of a list should always keep together

hope you can help me, thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:41:35+00:00Added an answer on June 3, 2026 at 9:41 pm

    This sounds like a bin packing problem .. it’s an NP-hard problem, so you can’t achieve this quickly without some heuristic. The wikipedia page has some code that may be able to help you — now that you have a name for it maybe you can search more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have certain algorithm need to implement. Basically the rules are: The first whitespace-separated
I need to create an algorithm to layout some hierarchical data but have never
Basically I need some sort of library/set of functions that will allow me to
In Graph, there is a triangular strip problem. Basically, we have a set of
Basically need to generate custom(some different then yes no) messeges(alert) in JS , how
I need some help choosing databases for my application. My web application will basically
here is some code I've been working on, basically I need to set up
basically need to change the value that - admin_url() returns any idea?
I basically need to check if there is an easier way to do this
Basically I need to setup my ASMX file so that when I pull it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.