- This is a coding asssessment for prospective supahands engineers
- Keep in mind that you should aim to make a strong impression and feel free to demonstrate your skills. Consider this coding assessment as an opportunity to showcase your abilities.
- Given a list of time stamps that is generated by the provided seed.py, where the timestamps represent login time
- Length is defined as the number of days of consecutive logins, NOT the number of consecutive logins
- Output a table with time stamps sorted by consecutive logins, sorted by descending length
- For example, if given the following timestamps
- ['2021-03-13 15:13:05', '2021-03-13 23:13:05', '2021-03-16 15:13:05', '2021-03-16 23:13:05', '2021-03-17 07:13:05', '2021-03-17 15:13:05', '2021-03-17 23:13:05', '2021-03-18 07:13:05', '2021-03-18 15:13:05']
- DO NOT use the example above as input
- Since the longest period of consecutive logins occur from 2021-03-16 to 2021-03-18, the answer would be
START | END | LENGTH |
---|---|---|
2021-03-16 | 2021-03-18 | 3 |
2021-03-13 | 2021-03-13 | 1 |
- The problem stems from needing to award badges for consecutive logins
- Fork the project here
- You can solve the problem using either python, javascript, or ruby
- Use the seed file to generate your output
- Use the seed file AS IS, do not modify the inherent logic of the seed file
- However, feel free to create js or rb versions of the seed file without modifying the inherent logic in the python original
- Do not copy the logic of the seed file into your code
- Notify [email protected] upon completion and include the join link for your replit.com project
- Solutions that do not follow the submission instructions WILL NOT be considered
- Remember to include unit tests either as separate files or using the replit test functionality
- REMINDER DO NOT edit or amend the seed file
- Include a separate readme in the form of a instructions.txt if additional instructions are required to get your solution running, such as installing libraries
- Your solution should follow best practices such as DRY, KISS, YAGNI, SOLID etc.
- Feel free to use 3rd party libraries
- Solutions that do not follow the submission instructions WILL NOT be considered
- We WILL NOT be processing submissions that do not match the output format as stipulated in Outputs
- You are ENCOURAGED to re-attempt the assessment in the event that you do not do well enough in the first attempt
- Submitted code will be assessed based on the following criteria
- Does it work? The solution should work in replit or codecollab
- Do we have tests, and do they work?
- Is the code clearly documented?
- Did the candidate read the README and comprehended the instructions in the README?
- Defensibility - Does the code handle dirty data, incorrect input data, attacks?
- Maintainability - Is the code written with small discrete functions, using either a functional or object oriented approach
- Best practices - Good test coverage, good tests, testing both positive and negative outcomes, good naming of methods and functions in the code
- Run time or space efficiency vs Input Growth - Write the most optimal code possible
- The gist is that the candidate should write production quality code
- During the assessment we expect an output of the following format
START | END | LENGTH |
---|---|---|
2021-03-03 | 2021-03-10 | 8 |
2021-02-15 | 2021-03-18 | 4 |
2021-02-10 | 2021-03-12 | 3 |
2021-01-03 | 2021-01-03 | 1 |