OOP Problems to use for Coding Tests during interviews

后端 未结 9 2089
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-31 12:00

As a second interview I get people to sit down and write code...I try to make the problem really technology independent.

My programming problems that I have don\'t reall

相关标签:
9条回答
  • 2021-01-31 12:42

    You could do worse than ask them to design a MapReduce library with a single-process implementation. Will the interface still work for a distributed implementation? What's the exception-handling policy? Should there be special support for chaining MapReduce jobs in a pipeline? What's the interface to the inputs and outputs? How are inputs chunked up? Can different inputs in one job go to different mappers? What defaults are reasonable?

    A good solution in Python takes about a page of code.

    0 讨论(0)
  • 2021-01-31 12:44

    ideally, you want to present a problem that appears difficult, but has a simple, elegant, obvious solution if you think in OO terms

    perhaps:

    • we need to control access to a customer web site
    • each customer may have one or more people to access the site
    • different people from different customers may be able to view different parts of the site
    • the same person may work for more than one customer
    • customers want to manage permissions based on the person, department, team, or project

    design a solution for this using object-oriented techniques


    one OO solution is to have a Person, a Customer, an Account, and AccountPermissions, where the Account specifies a Person and a Customer and an optional Parent Account. the use of a recursive Account object collapses the otherwise cumbersome person/team/department/project structure a direct ERD solution might yield

    0 讨论(0)
  • 2021-01-31 12:44

    Designing Social Security Application is something which I ask a lot of people during interviews.

    The nice thing about this is everyone is aware of how it works and what things to keep track of. They also have to justify their design and this really helps me get inside their head :) (As there is lots of flexibility here)

    Kind regards,

    0 讨论(0)
提交回复
热议问题