Click here to Skip to main content
15,918,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have an ArrayList like this
[100, 101, 110, 011, 1111, 1110, 010, 00, 00]


i want to convert that ArrayList to something like this

[1,0,0,1,0,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0]


please help me
thx
Posted
Updated 29-Jan-12 19:35pm
v2
Comments
TorstenH. 30-Jan-12 1:37am    
I added a homework tag - just to make sure there are no complete solutions posted here. Richard has the right advice.

Try to solve it - and come back with a piece of code if you need some help.
We will help, but we also want to see you doing your homework yourself.

1 solution

I would think you need to iterate the first list from element 0 to the end, splitting each returned item into its constituent parts and adding each part to the second array.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900