• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

find middle element of linkedlist

 
sivakondalu dokku
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome Coderanch


please suggest me, how to insert objects into LinkedList and Find middle element ?









ThankQ
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



hope it helps.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49370
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But why?
 
Tony Docherty
Bartender
Posts: 2965
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there's an even number of elements then there isn't a middle element.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic