Coder Social home page Coder Social logo

anagramer's Introduction

Coding Exercise

Write a Java program that takes as it's input an arbitrarily long sequence of words where each word has arbitrary length and is limited to the 26 characters (a-z). The output of this program is a boolean value for each input word. TRUE if the word is an anagram of any of the previous inputs, and FALSE otherwise. The program should read its input from a file of newline separated words and write its output to standard out. The program should make efficient use of memory and perform well with large data sets.

Provide some test cases to demonstrate that the code works as expected. Also, please provide a solution that does not use existing Java collections.

Also, please provide a written explanation of your approach to the problem, your thought process in your choice of data structures and algorithms (including any choices you considered and rejected), design tradeoffs, and why you expect your design to perform well with very large data sets.

How does the memory footrpint scale with the number of words and the word lengths? How does the response time scale with the number of words and word lengths? The answers to these scalability questions depend not only on the program design, but on the nature of the input sets. A complete and precise treatment is a major undertaking, but take it as far as you can go. If you make any simplifying assumptions about the input distributions, call them out. Can you make empirical measurements to verify your scalability theories? If you don't have time to make those measurements, explain how you would go about collecting the data.

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.