Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Anand George SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)

Similar presentations


Presentation on theme: "By Anand George SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)"— Presentation transcript:

1 By Anand George SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)

2 Linked list Sorting  No moving of data like in the array.  But just exchange the links when needed. 1 link 7 3 9 NULL 1 link 7 3 9 NULL After Sorting Before Sorting SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)

3 Demo  Linked list sorting. SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)

4 Complications? How to deal?  Try to get a reasonable understanding of the algorithm or the “logic”.  Give your best effort to implement the logic by yourself even though you are sure you may not be able to do it.  Debug, Debug and Debug. Make sure your stepping and breakpoint goes into all the if else cases in multiple iterations.  Now look at working implementation.  Debug and modify the working implementation.  If you don’t understand a line comment out that line and see what difference it makes in the working implementation.  See if you can make your implementation work?  Don’t Try to understand the working implementation without having a proper understanding of the logic. Try to understand the working implementation without a sincere attempt from your side. Try to look at code of the working implementation and try to understand the follow without debugging. Remember you are not a computer you have to “think” and act like a CPU to understand the flow without the help of a debugger. SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)

5 If you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. Linus Torvalds. Linux kernel coding style document -  Unfortunately all the code your manager will ask you to understand and/or enhance/fix is not written by Linus or Linux Kernel.  You need to get familiarize with all kind of complications and complexities when it comes to code written by others. SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)

6 Summary  Linked List Sorting  How to deal with complicated logic in the code effectively. SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)

7 Thank you SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)


Download ppt "By Anand George SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)"

Similar presentations


Ads by Google