Talk:Sort using a custom comparator: Difference between revisions

Content added Content deleted
(Yes, the J solution involves a callback.)
Line 30: Line 30:
:My previously mentioned uncertainty is largely relieved by the replacement J code posted by [http://www.jsoftware.com/jwiki/DanBron Dan Bron], which clearly uses the primary sorting facility of the language. Whether the customizing aspect counts as a callback should not actually matter. --[[User:TBH|TBH]] 23:06, 16 March 2008 (MDT)
:My previously mentioned uncertainty is largely relieved by the replacement J code posted by [http://www.jsoftware.com/jwiki/DanBron Dan Bron], which clearly uses the primary sorting facility of the language. Whether the customizing aspect counts as a callback should not actually matter. --[[User:TBH|TBH]] 23:06, 16 March 2008 (MDT)
::I studied callbacks enough to identify that the adverb technique Dan used definitely counts as such. --[[User:TBH|TBH]] 20:26, 4 April 2008 (MDT)
::I studied callbacks enough to identify that the adverb technique Dan used definitely counts as such. --[[User:TBH|TBH]] 20:26, 4 April 2008 (MDT)


==C# Example is incorrect==
Hi Ronw,<br>
The C# example is incorrect as the task asks for one callback function that sorts: "in order of descending length, and in ascending lexicographic order for strings of equal length."
This means that when strings are of equal length, and only then, their order is to be in terms of increasing, case-insensitive, character order.
Your output file would have headings for only ''Unsorted'' and ''Sorted'' where strings 'sorted' and 'sample' should be switched; as should 'to' and 'be'. --[[User:Paddy3118|Paddy3118]] 19:32, 19 November 2009 (UTC)