Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Form minimum groups

Form minimum groups

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasealgorithmshelpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Roshan P Mohammed
    wrote on last edited by
    #1

    Hi All - I have a problem. I want to arrange n number of items in the minimum group. There is maximum upper range for the group. I will explain in detail Assume database contains below values Emp1 10 Emp2 2 Emp3 4 Emp4 3 Emp5 11 Emp6 1 Emp7 4 Emp8 9 Emp9 5 Emp10 7 Emp11 14 Emp12 1 Emp13 4 Now I want to create minimum number of groups, where sum of the elements should not exceed say 15 like below Group 1 Emp1 10 Emp2 2 Emp4 3 Group 2 Emp3 4 Emp5 11 Group 3 Emp6 1 Emp8 9 Emp9 5 Group 4 Emp7 4 Emp10 7 Emp13 4 Group 5 Emp11 14 Emp12 1 Application is ASP .net with C#. Is there any predefined algorithm for achieving this? Thanks in advance Roshan

    N B 2 Replies Last reply
    0
    • R Roshan P Mohammed

      Hi All - I have a problem. I want to arrange n number of items in the minimum group. There is maximum upper range for the group. I will explain in detail Assume database contains below values Emp1 10 Emp2 2 Emp3 4 Emp4 3 Emp5 11 Emp6 1 Emp7 4 Emp8 9 Emp9 5 Emp10 7 Emp11 14 Emp12 1 Emp13 4 Now I want to create minimum number of groups, where sum of the elements should not exceed say 15 like below Group 1 Emp1 10 Emp2 2 Emp4 3 Group 2 Emp3 4 Emp5 11 Group 3 Emp6 1 Emp8 9 Emp9 5 Group 4 Emp7 4 Emp10 7 Emp13 4 Group 5 Emp11 14 Emp12 1 Application is ASP .net with C#. Is there any predefined algorithm for achieving this? Thanks in advance Roshan

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Roshan P Mohammed wrote:

      Is there any predefined algorithm for achieving this?

      No, you're on your own


      I know the language. I've read a book. - _Madmatt

      R 1 Reply Last reply
      0
      • N Not Active

        Roshan P Mohammed wrote:

        Is there any predefined algorithm for achieving this?

        No, you're on your own


        I know the language. I've read a book. - _Madmatt

        R Offline
        R Offline
        Roshan P Mohammed
        wrote on last edited by
        #3

        please guide me in the right direction

        N 1 Reply Last reply
        0
        • R Roshan P Mohammed

          Hi All - I have a problem. I want to arrange n number of items in the minimum group. There is maximum upper range for the group. I will explain in detail Assume database contains below values Emp1 10 Emp2 2 Emp3 4 Emp4 3 Emp5 11 Emp6 1 Emp7 4 Emp8 9 Emp9 5 Emp10 7 Emp11 14 Emp12 1 Emp13 4 Now I want to create minimum number of groups, where sum of the elements should not exceed say 15 like below Group 1 Emp1 10 Emp2 2 Emp4 3 Group 2 Emp3 4 Emp5 11 Group 3 Emp6 1 Emp8 9 Emp9 5 Group 4 Emp7 4 Emp10 7 Emp13 4 Group 5 Emp11 14 Emp12 1 Application is ASP .net with C#. Is there any predefined algorithm for achieving this? Thanks in advance Roshan

          B Offline
          B Offline
          Brij
          wrote on last edited by
          #4

          You have to implement your own logic to accomplish this.There is no readymade algorithm for that.

          Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

          1 Reply Last reply
          0
          • R Roshan P Mohammed

            please guide me in the right direction

            N Offline
            N Offline
            Not Active
            wrote on last edited by
            #5

            Here[^]


            I know the language. I've read a book. - _Madmatt

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups