• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struggling with Logic  RSS feed

 
Ravi Shankar Aiyer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guyz,

Currently I am struggling with the logic.
I am facing difficulty understanding the logic or write new logic by thinking even with very small programs, for example binary sort. Ya, I know its an algorithm and every two consecutive bits are compared and sorted in ascending order and so on.

I am even unable to understand the logic from an already exiting program. I am getting confused
The above binary sort is just an example.

I know the concept, but I am unable to put this as a program.

How to improve my logical skills?

Please help.

Thank you.
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Careful about spelling, please. It’s not “guyz” or “ya”.

Learn your algorithms from a book, not by trying to take code apart. You will have to write the algorithms down with a pencil, and convert them to code. A large eraser will be necessary. Show us what you expect, and what you have as your logic. And practise, practise, practise.
 
Pavan Kumar Dittakavi
Ranch Hand
Posts: 108
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
+1 for the comment
Campbell Ritchie wrote: A large eraser will be necessary.


Hi Ravi,

Its ok. No one gets it right the first time. Take your own time. I think you can refer to videos from you-tube which simulate/explain the sorting algorithms. Once that is done, try to trace the code flow yourself. you should be good. .

-Pavan.
 
Ravi Shankar Aiyer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!