Giter VIP home page Giter VIP logo

ql-challenge-2's Introduction

QL-Challenge-2

Challenge #2: Lexicographic Sorting

Summary: Write a function to sort an array of strings based on an arbitrary lexicographic ordering. The function will take two parameters: an array of strings to sort and a string specifying the lexicographic order.

Example input #1: ( ["acb", "abc", "bca"], "abc") Example output #1: ["abc","acb","bca"]

Example input #2: ( ["acb", "abc", "bca"], "cba") Example output #2: ["bca", "acb", "abc"]

Example input #3: (["aaa","aa",""], "a") Example output #3: ["", "aa", "aaa"]

You may assume that the strings to be sorted consist only of characters from the specified lexicographical ordering. You may also assume that the characters in the strings to sort consist only of lowercase a-z.

Deliverables: A link to a Github repo with the source of your project. Thorough commenting of the code isn't necessary, but you will have to explain it in detail to us. In addition, please provide a brief runtime analysis of your solution.

ql-challenge-2's People

Contributors

indiramuru avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.