{"id":19390176,"url":"https://github.com/bpstelios10/coursera-algos-part2","last_synced_at":"2025-08-09T06:22:25.479Z","repository":{"id":206524338,"uuid":"717112352","full_name":"bpstelios10/coursera-algos-part2","owner":"bpstelios10","description":"Coursera algorithms 2 (from Princeton Uni)","archived":false,"fork":false,"pushed_at":"2023-12-07T23:03:32.000Z","size":14467,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T20:55:36.823Z","etag":null,"topics":["algorithms","burrows-wheeler-transform","data-compression","graphs","java","maximum-flow","minimum-cut","radix-sort","shortest-paths","spanning-trees","stringsearch","tries"],"latest_commit_sha":null,"homepage":"https://www.coursera.org/learn/algorithms-part2","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/bpstelios10.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}},"created_at":"2023-11-10T15:29:08.000Z","updated_at":"2023-12-20T10:32:24.000Z","dependencies_parsed_at":"2023-12-08T00:32:51.064Z","dependency_job_id":null,"html_url":"https://github.com/bpstelios10/coursera-algos-part2","commit_stats":null,"previous_names":["bpstelios10/coursera-algos-part2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bpstelios10/coursera-algos-part2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpstelios10%2Fcoursera-algos-part2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpstelios10%2Fcoursera-algos-part2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpstelios10%2Fcoursera-algos-part2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpstelios10%2Fcoursera-algos-part2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bpstelios10","download_url":"https://codeload.github.com/bpstelios10/coursera-algos-part2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpstelios10%2Fcoursera-algos-part2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259756879,"owners_count":22906679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["algorithms","burrows-wheeler-transform","data-compression","graphs","java","maximum-flow","minimum-cut","radix-sort","shortest-paths","spanning-trees","stringsearch","tries"],"created_at":"2024-11-10T10:19:17.480Z","updated_at":"2025-06-14T04:07:19.249Z","avatar_url":"https://github.com/bpstelios10.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Algorithms from Coursera, part 2\n\n## Week 1 - wordNet\nTo run tests of week1 assignment, from commandline, you need to go to [week1-wordnet/build](week1-wordnet/build) folder and run:\n```shell\njava -classpath :../../.lift/algs4.jar WordNet ../synsets3.txt ../hypernyms3.txt\njava -classpath :../../.lift/algs4.jar SAP ../digraph1.txt\njava -classpath :../../.lift/algs4.jar Outcast ../synsets.txt ../hypernyms.txt ../outcast5.txt ../outcast8.txt ../outcast11.txt\n```\nand from intellij run (make sure that working directory is coursera-algos-part2):\nWordNet::main with program arguments \"week1-wordnet/synsets3.txt week1-wordnet/hypernyms3.txt\"\nOutcast::main with program arguments \"week1-wordnet/synsets.txt week1-wordnet/hypernyms.txt week1-wordnet/outcast5.txt week1-wordnet/outcast8.txt week1-wordnet/outcast11.txt\"\nSAP::main with program arguments \"week1-wordnet/digraph1.txt\"\n\n## Week 2 - Seam Carver\nTo run tests of week2 assignment, from commandline, you need to go to [week2-seam/build](week2-seam/build) folder and run:\n```shell\njava -classpath :../../.lift/algs4.jar SeamCarver ../10x12.png\njava -classpath :../../.lift/algs4.jar SeamCarverTest ../6x5.png\njava -classpath :../../.lift/algs4.jar AcyclicWeightedVertexShortestPath\n```\nand from intellij run (make sure that working directory is coursera-algos-part2):\nSeamCarver::main with program arguments \"week2-seam/10x12.png\"\nSeamCarverTest::main with program arguments \"week2-seam/6x5.png\"\nAcyclicWeightedVertexShortestPath::main\n\n## Week 3 - Baseball\nTo run tests of week3 assignment, from commandline, you need to go to [week3-baseball/build](week3-baseball/build) folder and run:\n```shell\njava -classpath :../../.lift/algs4.jar BaseballElimination ../teams4a.txt\njava -classpath :../../.lift/algs4.jar BaseballEliminationTest ../teams5b.txt\n```\nand from intellij run (make sure that working directory is coursera-algos-part2):\nBaseballElimination::main with program arguments \"week3-baseball/teams4a.txt\"\nBaseballEliminationTest::main with program arguments \"week3-baseball/teams5b.txt\"\n\n## Week 4 - Boggle\nTo run tests of week4 assignment, from commandline, you need to go to [week4-boggle/build](week4-boggle/build) folder and run:\n```shell\njava -classpath :../../.lift/algs4.jar BoggleSolverTest ..\njava -classpath :../../.lift/algs4.jar BoggleSolverManualTest ..\n# and for a game of boggle in GUI with 5 rows and 6 cols (if no numbers specified, a 4x4 board is created)\njava -classpath :../../.lift/algs4.jar BoggleGame \"..\" 5 6\n```\nand from intellij run (make sure that working directory is coursera-algos-part2):\nBoggleSolverTest::main with program arguments \"week4-boggle\"\nBoggleSolverManualTest::main with program arguments \"week4-boggle\"\nBoggleGame::main with program arguments week4-boggle 5 6\nNOTE: if it fails with error for GraphicsEnvironment, you should use `java` directly from your jdk/bin path\n\n## Week 5 - Burrows\nTo run tests of week5 assignment, from commandline, you need to go to [week5-burrows/build](week5-burrows/build) folder and run:\n```shell\n# abra.txt to test MoveToFront encode (result is in assignment page)\n# complexTestCases.txt for testing decode and more complex cases\ncat ../abra.txt | java -classpath :../../.lift/algs4.jar MoveToFront - | java -classpath :../../.lift/algs4.jar edu.princeton.cs.algs4.HexDump 16\ncat ../aomplexTestCases.txt | java -classpath :../../.lift/algs4.jar MoveToFront - | java -classpath :../../.lift/algs4.jar MoveToFront +\njava -classpath :../../.lift/algs4.jar CircularSuffixArray\n# abra.txt to test BurrowsWheeler encode (result is in assignment page)\n# complexTestCases.txt for testing decode and more complex cases\ncat ../abra.txt | java -classpath :../../.lift/algs4.jar BurrowsWheeler - | java -classpath :../../.lifedu.princeton.cs.algs4.HexDump 16\ncat ../complexTestCases.txt | java -classpath :../../.lift/algs4.jar BurrowsWheeler - | java -classpath :../../.lift/algs4.jar BurrowsWheeler +\n```\nFrom intellij it is trickier. For encoding, it is possible to provide StdIn from file, but for decoding i didnt try it. So:\nMoveToFront::main with program argument \"-\" and _**redirect input from**_ (in run configuration) point to abra.txt\nCircularSuffixArray::main\nBurrowsWheeler::main with program argument \"-\" and _**redirect input from**_ (in run configuration) point to abra.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpstelios10%2Fcoursera-algos-part2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpstelios10%2Fcoursera-algos-part2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpstelios10%2Fcoursera-algos-part2/lists"}