cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
How to solve this problem of linked list
How to solve this problem of linked lists.
Apr 4, 2012 at 3:44pm UTC
srikanth chitturi
(37)
I want to do a problem that. I am given two linked lists L and P.
write a functions printLots(L,p). such that the elements in L that are in positions specified by P.
for example p = 1,3,5,7. the first,third... elements in L are printed.
Apr 4, 2012 at 3:53pm UTC
clanmjc
(666)
Sounds like you've answered your own question. Use the values from P as the index (which you will have to traverse) to print out the elements in L.
Topic archived. No new replies allowed.