Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

find middle element of linkedlist  RSS feed

 
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: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



hope it helps.
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But why?
 
Tony Docherty
Bartender
Posts: 3211
78
  • 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
Boost this thread!