X-Received: by 2002:a0c:b521:: with SMTP id d33mr4178809qve.52.1553879982635; Fri, 29 Mar 2019 10:19:42 -0700 (PDT) X-Received: by 2002:a25:6151:: with SMTP id v78mr41893531ybb.359.1553879982394; Fri, 29 Mar 2019 10:19:42 -0700 (PDT) Path: csiph.com!4.us.feeder.erje.net!feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!t9no1779904qtn.0!news-out.google.com!i8ni174qtr.1!nntp.google.com!t9no1779885qtn.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Fri, 29 Mar 2019 10:19:41 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.78.95.177; posting-account=2czF5goAAAD4GBMPIGV4KcD2K4PhoB_H NNTP-Posting-Host: 50.78.95.177 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5f47e62a-bb2c-4bf4-b048-956bee55a12a@googlegroups.com> Subject: Re: Interview question - better solution for MergePurgeAndReverseOrder() From: Eric Douglas Injection-Date: Fri, 29 Mar 2019 17:19:42 +0000 Content-Type: text/plain; charset="UTF-8" Lines: 8 Xref: csiph.com comp.lang.java.programmer:38829 On Friday, March 29, 2019 at 12:53:18 PM UTC-4, Graeme Geldenhuys wrote: > I fully agree, and that is how I would implement code "in the real > world". But as this was an interview technical test, I was given two > classes and the second one had an empty implementation for > MergePurgeAndReverseSort(). > > I was not allowed to change anything, other than implement the method. > It sounds like they were trying to give you a hint that you shouldn't want to work there. Normalizing code is the best answer. That sounds like 3 separate methods.