{"id":20982606,"url":"https://github.com/highkay/zuora_homework","last_synced_at":"2026-05-20T20:10:04.299Z","repository":{"id":141610932,"uuid":"124472399","full_name":"highkay/zuora_homework","owner":"highkay","description":"Homework from zuora.","archived":false,"fork":false,"pushed_at":"2018-03-12T07:36:25.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T09:48:06.394Z","etag":null,"topics":["java8","streaming-api"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/highkay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-09T01:53:53.000Z","updated_at":"2018-03-12T07:38:47.000Z","dependencies_parsed_at":"2023-04-13T18:03:14.471Z","dependency_job_id":null,"html_url":"https://github.com/highkay/zuora_homework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/highkay/zuora_homework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highkay%2Fzuora_homework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highkay%2Fzuora_homework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highkay%2Fzuora_homework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highkay%2Fzuora_homework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/highkay","download_url":"https://codeload.github.com/highkay/zuora_homework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highkay%2Fzuora_homework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33273703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T15:12:43.734Z","status":"ssl_error","status_checked_at":"2026-05-20T15:12:42.300Z","response_time":356,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java8","streaming-api"],"created_at":"2024-11-19T05:46:05.189Z","updated_at":"2026-05-20T20:10:04.261Z","avatar_url":"https://github.com/highkay.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Three page path\n\nGiven a dataset that represents a user's navigation of a website, find the top N most frequently visited paths.\nData\nThe data comes from a web server's access logs where you typically get the following fields: timestamp, IP address, request string, response code, user agent and cookies. For brevity, we provide a dataset that has the user and page parsed out.\n\n\u003cpre\u003e\nUser\tPage\nU1\t/\nU1\tlogin\nU1\tsubscriber\nU2\t/\nU2\tlogin\nU2\tsubscriber\nU3\t/\nU3\tlogin\nU3\tproduct\nU1\t/\nU4\t/\nU4\tlogin\nU4\tproduct\nU5\t/\nU5\tlogin\nU5\tsubscriber\n\u003c/pre\u003e\n\nThe following words are used to describe the function that needs to be written: Find the top N most popular 3-page paths, where a path is three sequential page visits by a user.\nThe example I use is from U1, where the traversal is: / -\u003e login -\u003e subscriber -\u003e /\nIn the above example, we have two paths:\n\n\u003cpre\u003e\n     1.     / -\u003e login -\u003e subscriber\n     2.     login -\u003e subscriber -\u003e /\n\u003c/pre\u003e\n\nExpected Output\nExamples of output for the above example data.\n\n\u003cpre\u003e\nTop 10\n/ -\u003e login -\u003e subscribers : 3\n/ -\u003e login -\u003e product : 2\nlogin -\u003e subscriber -\u003e / : 1\nTop 2\n/ -\u003e login -\u003e subscribers : 3\n/ -\u003e login -\u003e product : 2\n\u003c/pre\u003e\n\nYou are recommended to implement the following interface, however you are still free to define your own interface. \n\n```java\npublic interface TopNPopularPathService { \n    void setup(String[][] data);\u2028\n    String[] getTopNPopularPaths(int n); \n}\n```\n\n### Requirements: \n\n1) Coding should be completed with production like quality. \n2) Write at least one positive unit test. \n3) Use JDK and common utility lib (e.g. apache-common), introduce too many 3rd libs is not recommended. \n4) The program you write can run independently, it should not depend on external application or service. \n\n### Build and run\n\nBuild\n\n```\nmvn install\n```\n\nRun\n\n```\nmvn test\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighkay%2Fzuora_homework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhighkay%2Fzuora_homework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighkay%2Fzuora_homework/lists"}