C++ ProgrammingGeneral discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
hi .. I m writing for the first time..
here r some solutions ;;
1> singly list -- finding last but nth element..
a. maintain 2 pointers initialised at root.
b. forward first to nth element
c. now forward both till first reaches end..
d. now second is poinint at last but nth element
e. remove it.
2. array duplicaion removal
a. sort the array using standard method..complexity O(n log n)
b. remove same consecutives.. complexity O(n)
c. overall complexity .. o(n log n)