Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 09:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



disjoint lists from 1 list.. looking for generic solution(N sublists)

Discussion on disjoint lists from 1 list.. looking for generic solution(N sublists) within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
Buckyx's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 177
Received Thanks: 2
disjoint lists from 1 list.. looking for generic solution(N sublists)

they should also preserve element order

eg. initial list = { 1, 2, 3, 4 }

2 sublists = [{ 1 }, { 2, 3, 4 }], [{ 1, 2 }, { 3, 4 }], [{ 1, 2, 3 }, { 4 }]
3 sublists = [{ 1 }, { 2 }, { 3, 4 }], [{ 1 }, { 2, 3 }, { 4 }], [{ 1, 2 }, { 3 }, { 4 }] etc

up to N sublists and all of them

I can come up with simple solution for N = 2 or 3 sublists but I need more of them. like 5 and would like to avoid bad code of generating each N separately

found a solution but its ugly as hell, just in case someone would like to solve this in the future

Buckyx is offline  
Reply


Similar Threads Similar Threads
[LIST] WarRock Privat Server List! [LIST]
07/27/2013 - WarRock - 46 Replies
http://archiv.so/images/2013/03/01/bQaXx.png Hallo elitepvpers Community! Da es in letzter Zeit viele unnötige Threads, mit Fragen zu guten Privat Servern gab, möchte ich es Neulingen (Newbies) etwas erleichern! Und das ganze soll durch diese Liste an mir bekannten WarRock P-Servern geschehen. Sollten euch noch weitere Server bekannt sein, schreibt den Thread-Link & Namen als Kommentar, damit ich diesen Server eventueller Weise auch noch rein editieren kann.



All times are GMT +1. The time now is 09:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.