{"id":15993069,"url":"https://github.com/cs50victor/bis-test","last_synced_at":"2026-06-05T04:31:36.251Z","repository":{"id":38895854,"uuid":"506748230","full_name":"cs50victor/bis-test","owner":"cs50victor","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T14:49:13.000Z","size":581,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T04:28:08.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"bis-test.vercel.app","language":"JavaScript","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/cs50victor.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":"2022-06-23T18:22:44.000Z","updated_at":"2022-06-23T18:34:47.000Z","dependencies_parsed_at":"2024-11-14T11:30:04.709Z","dependency_job_id":"a0f41bd7-6d16-4d0f-9e90-d9f18f633f11","html_url":"https://github.com/cs50victor/bis-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs50victor%2Fbis-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs50victor%2Fbis-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs50victor%2Fbis-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs50victor%2Fbis-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cs50victor","download_url":"https://codeload.github.com/cs50victor/bis-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241731748,"owners_count":20010781,"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":[],"created_at":"2024-10-08T06:42:48.651Z","updated_at":"2026-06-05T04:31:36.225Z","avatar_url":"https://github.com/cs50victor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BIS-Test\n\nlive result (front-end + server/api) is viewable on\n\n- [bis-test.vercel.app](https://bis-test.vercel.app)\n\n## Front-end Question/Task\n\n- on the landing page of the website listed above\n\n## Back-end Question/Task\n\nFor this section, I tried making an API endpoint for each question.\n\n1. Golang Fibonacci\n\n   - file location: api/fib.go\n   - endpoint: `https://bis-test.vercel.app/api/fib/?num=`\n   - example: `curl https://bis-test.vercel.app/api/fib/?num=10`\n\n    ```go\n    func fibonacci(n int) []int {\n    sequence := []int{}\n    var n1, n2 int = 0, 1\n    var n3 int\n\n    for i := 1; i \u003c= n; i++ {\n        sequence = append(sequence, n1)\n        n3 = n1 + n2\n        n1 = n2\n        n2 = n3\n    }\n    return sequence\n    }\n    ```\n\n2. Word Count\n\n   - file location: fileWordCount.py\n\n    ```py\n    from collections import defaultdict, OrderedDict\n\n    \"\"\"\n    1. File Word Count\n    \"\"\"\n\n    def fileWordCount(fileName):\n        uniqueWords = defaultdict(int)\n    \n    # only the current line in the file is read into memory\n    # previous lines are garbage collected\n\n    with open(fileName) as file:\n        for line in file:\n            allWords = line.split(\" \")\n            for word in allWords:\n                text = word.lower().strip()\n                if text.isascii():\n                    uniqueWords[text] += 1\n\n    print(\n        f\"Number of uniquewords - {len(uniqueWords)}.\\nFormat: word - number of occurences in file.\"\n    )\n\n    sortedUniqueWords = OrderedDict(sorted(uniqueWords.items(), key=lambda item: item[1], reverse=True))\n\n    for word, occurences in sortedUniqueWords.items():\n        print(f\"{word}\".ljust(20) + f\"- {occurences}\")\n\n    return sortedUniqueWords\n    ```\n\n3. Balanced Parenthesis\n\n   - file location: api/isBalanced.py\n   - endpoint: `https://bis-test.vercel.app/api/isBalanced/?string=`\n   - example: `curl https://bis-test.vercel.app/api/isBalanced/?string=(())`\n\n    ```py\n    def isParenthesisBalanced(self, string):\n        bracketArr = [\"(\", \")\", \"{\", \"}\", \"[\", \"]\"]\n        allBrackets = set(bracketArr)\n        bracketPairs = { bracketArr[i] : bracketArr[i+1] for i in range(0, len(bracketArr)-1,2)}\n\n        # stack implementation using a list\n        openBrackets = []\n\n        for char in string:\n            if char in allBrackets:\n                if char in bracketPairs:\n                    openBrackets.append(char)\n                else:\n                    if len(openBrackets)==0:\n                        return False\n                    lastOpenBracket = openBrackets.pop()\n                    expectedBracket = bracketPairs[lastOpenBracket]\n                    if char != expectedBracket:\n                        return False\n\n        # assuming that a string with no brackets is balanced\n        return len(openBrackets) == 0\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs50victor%2Fbis-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcs50victor%2Fbis-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs50victor%2Fbis-test/lists"}