├── __init__.py
├── python
├── __init__.py
├── tests
│ ├── __init__.py
│ ├── daily_challenge_test.py
│ └── py_actions_test.py
├── pytest.ini
├── py_actions.py
└── daily_challenge.py
├── requirements.txt
├── javascript
├── package.json
├── add_challenge_to_spaces.js
├── package-lock.json
└── js_actions.js
├── .github
├── CODEOWNERS
├── PULL_REQUEST_TEMPLATE.md
├── workflows
│ ├── yamllint.yml
│ ├── node.js.yml
│ ├── daily.yml
│ └── python-app.yml
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
├── config.yml
└── CONTRIBUTING.md
├── .gitignore
├── README.md
└── topics.yaml
/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/tests/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | requests==2.25.1
2 | pyyaml==5.4.1
--------------------------------------------------------------------------------
/javascript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "js-yaml": "^4.1.0",
4 | "node-fetch": "^2.6.1"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/python/pytest.ini:
--------------------------------------------------------------------------------
1 | # pytest.ini
2 | [pytest]
3 | minversion = 6.0
4 | addopts = -ra -q --continue-on-collection-errors
5 | testpaths =
6 | tests
7 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # These owners will be the default owners for everything in
2 | # the repo. Unless a later match takes precedence,
3 | # they will be requested for review when someone opens a pull request.
4 | * @KGmajor
--------------------------------------------------------------------------------
/python/tests/daily_challenge_test.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | try:
4 | import python.daily_challenge
5 | except ImportError:
6 | pytest.skip("Skipping module import", allow_module_level=True)
7 |
8 |
9 | class Test_Daily_challenge_Format_post_body:
10 | def test_format_post_body_fail(self):
11 | result = python.daily_challenge.format_post_body({}, 5)
12 | assert pytest.raises(Exception)
13 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Description
2 | Please explain the changes you made here, feel free to leave Github comments wherever you might need to explain your solution.
3 |
4 | ### Checklist
5 | - [ ] Made sure my content contribution was publicly accessible and free
6 | - [ ] Code or Yaml content compiles correctly
7 | - [ ] Created tests (if possible, topic contributions don't need tests)
8 | - [ ] Added myself to the Contributors list on the README.md file
--------------------------------------------------------------------------------
/javascript/add_challenge_to_spaces.js:
--------------------------------------------------------------------------------
1 | //Import dependcies
2 | const fs = require("fs");
3 | const YAML = require("js-yaml");
4 |
5 | //import actions
6 | const { postQuestion } = require("./js_actions.js");
7 |
8 | try {
9 | const raw = fs.readFileSync("../topics.yaml");
10 | const data = YAML.load(raw);
11 | const lengthOfYAMLfile = Object.values(data).length;
12 | const latestQuestion = data[lengthOfYAMLfile];
13 | postQuestion(latestQuestion, lengthOfYAMLfile);
14 | } catch (err) {
15 | console.log(err);
16 | }
17 |
--------------------------------------------------------------------------------
/.github/workflows/yamllint.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: yamllint test
3 |
4 | on:
5 | push:
6 | branches: [ main ]
7 | pull_request:
8 | branches: [ main ]
9 |
10 | jobs:
11 | test:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v2
15 |
16 | - name: Set up Python
17 | uses: actions/setup-python@v2
18 | with:
19 | python-version: 3.8
20 |
21 | - name: Install yamllint
22 | run: pip install yamllint
23 |
24 | - name: Lint YAML files
25 | run: yamllint topics.yaml
26 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/workflows/node.js.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: Node.js CI
5 |
6 | on:
7 | workflow_dispatch:
8 | push:
9 | branches: [ main ]
10 |
11 | jobs:
12 | build:
13 |
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - uses: actions/checkout@v2
18 | - name: Use Node.js
19 | uses: actions/setup-node@v2
20 | with:
21 | node-version: '14.x'
22 | - name: Install dependencies
23 | run: npm install js-yaml node-fetch
24 | - name: Run Daily File
25 | run: node javascript/add_challenge_to_spaces.js
26 | env:
27 | API_TOKEN: ${{ secrets.API_TOKEN }}
28 | COMMUNITY_ID: ${{ secrets.COMMUNITY_ID }}
29 | CIRCLE_COMMUNITY_PATH: ${{ secrets.CIRCLE_COMMUNITY_PATH }}
30 | DAILY_SPACE_ID: ${{ secrets.DAILY_SPACE_ID }}
31 |
--------------------------------------------------------------------------------
/python/tests/py_actions_test.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | import python.py_actions
4 |
5 |
6 | class Test_Py_actions_Get_post_count:
7 | def test_get_post_count_1(self):
8 | result = python.py_actions.get_post_count(
9 | "03ea49f8-1d96-4cd0-b279-0684e3eec3a9")
10 | assert pytest.raises(Exception)
11 |
12 |
13 | class Test_Py_actions_Post_to_circle:
14 | def test_post_to_circle_1(self):
15 | result = python.py_actions.post_to_circle(
16 | "7289708e-b17a-477c-8a77-9ab575c4b4d8",
17 | "01:04:03",
18 | "cool",
19 | "email@Google.com",
20 | )
21 | assert pytest.raises(Exception)
22 |
23 | class Test_Py_actions_read_topics_yaml:
24 | def test_read_topics_yaml(self):
25 | result = python.py_actions.read_topics_yaml()
26 | assert isinstance(result, dict)
27 | assert all([result['1'], result['1']['title'], result['1']['body'], result['1']['source']])
28 |
29 | def test_read_topics_yaml_fail(self):
30 | result = python.py_actions.read_topics_yaml({})
31 | assert pytest.raises(Exception)
--------------------------------------------------------------------------------
/.github/workflows/daily.yml:
--------------------------------------------------------------------------------
1 | name: Run daily question
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: '0 12 * * 1-5'
6 |
7 | jobs:
8 | pull_data:
9 | runs-on: ubuntu-20.04
10 | steps:
11 | - name: Checkout code
12 | uses: actions/checkout@v2
13 | with:
14 | persist-credentials: false
15 | fetch-depth: 0
16 |
17 | # If using Python:
18 | - name: Set up Python 3.8
19 | uses: actions/setup-python@v2
20 | with:
21 | python-version: "3.8"
22 |
23 | # If using Python:
24 | - name: Install dependencies
25 | run: pip install -r requirements.txt
26 |
27 | # If using Python:
28 | - name: Run Daily Challenge
29 | run: python3 ./python/daily_challenge.py
30 | env:
31 | API_TOKEN: ${{ secrets.API_TOKEN }}
32 | COMMUNITY_ID: ${{ secrets.COMMUNITY_ID }}
33 | CIRCLE_COMMUNITY_PATH: ${{ secrets.CIRCLE_COMMUNITY_PATH }}
34 | DAILY_SPACE_ID: ${{ secrets.DAILY_SPACE_ID }}
35 | BINARYSEARCH_TOKEN: ${{ secrets.BINARYSEARCH_TOKEN }}
36 | DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
37 |
--------------------------------------------------------------------------------
/.github/workflows/python-app.yml:
--------------------------------------------------------------------------------
1 | # This workflow will install Python dependencies, run tests and lint with a single version of Python
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3 |
4 | name: Python application
5 |
6 | on:
7 | push:
8 | branches: [ main ]
9 | pull_request:
10 | branches: [ main ]
11 |
12 | jobs:
13 | build:
14 |
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - uses: actions/checkout@v2
19 | - name: Set up Python 3.9
20 | uses: actions/setup-python@v2
21 | with:
22 | python-version: 3.9
23 | - name: Install dependencies
24 | run: |
25 | python -m pip install --upgrade pip
26 | pip install flake8 pytest
27 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28 | - name: Lint with flake8
29 | run: |
30 | # stop the build if there are Python syntax errors or undefined names
31 | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
33 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34 | - name: Test with pytest
35 | run: |
36 | python3 -m pytest ./python
37 |
--------------------------------------------------------------------------------
/javascript/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "yearOne—Challenges",
3 | "lockfileVersion": 2,
4 | "requires": true,
5 | "packages": {
6 | "": {
7 | "dependencies": {
8 | "js-yaml": "^4.1.0",
9 | "node-fetch": "^2.6.1"
10 | }
11 | },
12 | "node_modules/argparse": {
13 | "version": "2.0.1",
14 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
15 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
16 | },
17 | "node_modules/js-yaml": {
18 | "version": "4.1.0",
19 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
20 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
21 | "dependencies": {
22 | "argparse": "^2.0.1"
23 | },
24 | "bin": {
25 | "js-yaml": "bin/js-yaml.js"
26 | }
27 | },
28 | "node_modules/node-fetch": {
29 | "version": "2.6.1",
30 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
31 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
32 | "engines": {
33 | "node": "4.x || >=6.0.0"
34 | }
35 | }
36 | },
37 | "dependencies": {
38 | "argparse": {
39 | "version": "2.0.1",
40 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
41 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
42 | },
43 | "js-yaml": {
44 | "version": "4.1.0",
45 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
46 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
47 | "requires": {
48 | "argparse": "^2.0.1"
49 | }
50 | },
51 | "node-fetch": {
52 | "version": "2.6.1",
53 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
54 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
55 | }
56 | }
--------------------------------------------------------------------------------
/.github/config.yml:
--------------------------------------------------------------------------------
1 | # Configuration for request-info
2 | # https://github.com/behaviorbot/request-info
3 |
4 | # *Required* Comment to reply with
5 | requestInfoReplyComment: >
6 | We would appreciate it if you could provide us with more info about this issue or pull request so we can better understand your code changes! 🚀
7 |
8 | # *OPTIONAL* default titles to check against for lack of descriptiveness
9 | # MUST BE ALL LOWERCASE
10 | requestInfoDefaultTitles:
11 | - update readme.md
12 | - updates
13 | - fixes
14 | - new feature
15 |
16 | # *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
17 | requestInfoLabelToAdd: needs-more-info
18 |
19 | ####################################################################################################
20 | # Configuration for welcome - https://github.com/behaviorbot/welcome
21 |
22 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
23 | # Comment to be posted to on first time issues
24 |
25 | newIssueWelcomeComment: >
26 | Hey! Thanks for the issue!
27 | Please make sure you have given us enough context and we will review it as soon as possible. ⏲️
28 | If you don't hear back from anyone within the next week, feel free to reach out to one of the maintainers.
29 | And if you haven't already, feel free to contribute a technical interview topic to our repo! Check out the [Contributing Guide!](https://github.com/YearOne-Prep/YearOne-prep-challenges/blob/main/.github/CONTRIBUTING.md)
30 |
31 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
32 | # Comment to be posted to on PRs from first time contributors in your repository
33 |
34 | newPRWelcomeComment: >
35 | Thanks for your contribution!
36 | Please make sure you have followed our contributing guidelines and we will review it as soon as possible. ⏲️
37 | If you don't hear back from anyone within the next week, feel free to reach out to one of the maintainers. 💛
38 |
39 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
40 | # Comment to be posted to on pull requests merged by a first time user
41 |
42 | firstPRMergeComment: >
43 | Congrats on merging your first pull request!🎉
44 |
45 |
46 | 
47 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | pip-wheel-metadata/
24 | share/python-wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .nox/
44 | .coverage
45 | .coverage.*
46 | .cache
47 | nosetests.xml
48 | coverage.xml
49 | *.cover
50 | *.py,cover
51 | .hypothesis/
52 | .pytest_cache/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | target/
76 |
77 | # Jupyter Notebook
78 | .ipynb_checkpoints
79 |
80 | # IPython
81 | profile_default/
82 | ipython_config.py
83 |
84 | # pyenv
85 | .python-version
86 |
87 | # pipenv
88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
91 | # install all needed dependencies.
92 | #Pipfile.lock
93 |
94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95 | __pypackages__/
96 |
97 | # Celery stuff
98 | celerybeat-schedule
99 | celerybeat.pid
100 |
101 | # SageMath parsed files
102 | *.sage.py
103 |
104 | # Environments
105 | .env
106 | .venv
107 | env/
108 | venv/
109 | ENV/
110 | env.bak/
111 | venv.bak/
112 |
113 | # Spyder project settings
114 | .spyderproject
115 | .spyproject
116 |
117 | # Rope project settings
118 | .ropeproject
119 |
120 | # mkdocs documentation
121 | /site
122 |
123 | # mypy
124 | .mypy_cache/
125 | .dmypy.json
126 | dmypy.json
127 |
128 | # Pyre type checker
129 | .pyre/
130 |
131 | # Node
132 | **/node_modules
133 |
--------------------------------------------------------------------------------
/javascript/js_actions.js:
--------------------------------------------------------------------------------
1 | const fetch = require("node-fetch");
2 |
3 | const API_TOKEN = process.env.API_TOKEN;
4 | const COMMUNITY_ID = process.env.COMMUNITY_ID;
5 | const CIRCLE_COMMUNITY_PATH = process.env.CIRCLE_COMMUNITY_PATH;
6 | const BEGGINER_SPACE_ID = process.env.BEGGINER_SPACE_ID;
7 | const MEDIUM_SPACE_ID = process.env.MEDIUM_SPACE_ID;
8 | const ADVANCED_SPACE_ID = process.env.ADVANCED_SPACE_ID;
9 |
10 | const postQuestion = async (question, questionNumber) => {
11 | const { title, difficulty, source, body, author_name } = question;
12 |
13 | const requestOptions = {
14 | method: "POST",
15 | headers: { Authorization: API_TOKEN },
16 | };
17 |
18 | const questionDifficulties = {
19 | Beginner: BEGGINER_SPACE_ID,
20 | Medium: MEDIUM_SPACE_ID,
21 | Advanced: ADVANCED_SPACE_ID,
22 | };
23 |
24 | const SPACE_ID = questionDifficulties[difficulty];
25 |
26 | //post sections
27 | let titleHTML = `Interview Prep Challenge ${questionNumber}: ${title}`;
28 | let bodyHTML = `
29 | 👏👏
Thanks to ${author_name} for the question!👏👏
30 |
31 | Difficulty Level: ${difficulty}
32 | Sourced from: ${source}
33 |
34 | ${body}
35 |
36 | This question was submitted in the YearOne Open Source project, to submit a topic, go to github.com/YearOne-Prep/YearOne-prep-challenges
37 |
38 | Don't forget to let us know that you've completed this question!
39 | Leave a comment below 👇👇👇👇
40 | `;
41 |
42 | //url creation
43 | const url = encodeURI(formatPostBody(titleHTML, bodyHTML));
44 |
45 | function formatPostBody(titleSection, bodySection) {
46 | const post_url = `${CIRCLE_COMMUNITY_PATH}/api/v1/posts?community_id=${COMMUNITY_ID}&SPACE_ID=${SPACE_ID}&`;
47 | const post_title = `name=${titleSection}&`;
48 | const post_body = `internal_custom_html=${bodySection}&`;
49 | const post_url_ending_params = `is_comments_enabled=true&is_liking_enabled=true&is_truncation_disabled=false`;
50 |
51 | const url_pieces = [
52 | post_url,
53 | post_title,
54 | post_body,
55 | post_url_ending_params,
56 | ];
57 |
58 | return url_pieces.join("");
59 | }
60 |
61 | // Updated Fetch request with baseURL
62 | const baseURL = 'http://localhost';
63 |
64 | try {
65 | const response = await fetch(new URL(url, baseURL, requestOptions));
66 | console.log(response.json());
67 | return response.json();
68 | }
69 |
70 | catch (err) {
71 | console.log(err);
72 | }
73 |
74 | // Previous Fetch request with error TypeError: Only absolute URLs are supported
75 |
76 | // await fetch(url, requestOptions)
77 | // .then((response) => response.json())
78 | // .then((result) => {
79 | // console.log(result);
80 | // })
81 | // .catch((error) => console.log("error", error));
82 | };
83 |
84 | module.exports = { postQuestion };
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # YearOne Interview Prep
2 |
3 | 
4 |
5 | This repo is where we host our open-source interview prep topics and actions
6 | that post to the YearOne community. We're open to contributions on the code,
7 | interview prep topics & new features!
8 |
9 | As a beginner-friendly open-source project, all you need to contribute is an
10 | interview prep article, video, or code challenge to share and a pull request to
11 | add it to our topics file!
12 |
13 | YearOne is a FREE developer community for non-traditional software engineers who
14 | have graduated from a coding bootcamp or who are self-taught, and have less than
15 | 2 years of professional experience as software engineers. We provide technical
16 | interview prep resources, mentorship and on-the-job support through our
17 | community platform.
18 |
19 | Join our community at [joinyearone.io](https://joinyearone.io)
20 |
21 | ## Contributing
22 |
23 | > To get started...
24 |
25 | 1. 🍴 [Fork](https://github.com/YearOne-Prep/YearOne-prep-challenges/fork) this
26 | repository
27 | 2. 🔨 View our
28 | [contributing guidelines](https://github.com/YearOne-Prep/YearOne-prep-challenges/blob/main/.github/CONTRIBUTING.md)
29 | 3. 📚
30 | [Contribute a new interview prep topic](https://github.com/YearOne-Prep/YearOne-prep-challenges/blob/main/.github/CONTRIBUTING.md#contributing-content)
31 | or check out our open
32 | [issues.](https://github.com/YearOne-Prep/YearOne-prep-challenges/issues)
33 | 4. 🎉
34 | [Open a new pull request](https://github.com/YearOne-Prep/YearOne-prep-challenges/compare)
35 | and get it approved!
36 |
37 | You can even
38 | [report a bug or request a feature](https://github.com/YearOne-Prep/YearOne-prep-challenges/issues/new) -
39 | any little bit of help counts! 😊
40 |
41 | ## 👏👏 Contributors 👏👏
42 |
43 | ### This project exists thanks to all the **people who contribute**.
44 |
45 | #### Maintainers
46 |
47 | - [Kristal Garcia](https://github.com/kgmajor)
48 | - [Rafael Castellanos-Welsh](https://github.com/rafawelsh)
49 |
50 | #### Contributors
51 |
52 | - [Pedro Ramirez](https://github.com/pramirez2328)
53 | - [Johnathan Raiss](https://github.com/johnny112f)
54 | - [Trevor Tomlin](https://github.com/trevortomlin)
55 | - [Jesus Quezada](https://github.com/machinesandpixels)
56 | - [Anita Ihuman](https://github.com/Anita-ihuman)
57 | - [Jesse Smith](https://github.com/jessesmith-13)
58 | - [Sourav Singh Rawat](https://github.com/frostzt)
59 | - [Kirill Grinash](https://github.com/kirillgrinash)
60 | - [Mario Carbonell](https://github.com/mgcarbonell)
61 | - [Hulya Karakaya](https://github.com/hulyak)
62 | - [Manon Sainton](https://github.com/Ginger-Mano)
63 | - [Kevin Minutti](https://github.com/K-minutti)
64 | - [Dolly Desir](https://github.com/dolly-d)
65 | - [Eamonn Cottrell](https://github.com/sieis)
66 | - [Tiffany Udoh](https://github.com/cassiel257)
67 | - [Jadiva Montealegre](https://github.com/jadivam)
68 | - [Maeling Murphy](https://github.com/maelingmurphy)
69 | - [Davis Omokaro](https://github.com/maelingmurphy)
70 | - [Audrey Patterson](https://github.com/arpatterson31)
71 |
72 | ## Continuous Deployment Pipeline
73 |
74 | We have github actions set up to automagically send new topics to the YearOne
75 | community on merge. You can see how we've set these up in the
76 | `.github/workflows` directory.
--------------------------------------------------------------------------------
/python/py_actions.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | import yaml
4 |
5 | from datetime import date
6 | from pprint import pprint
7 |
8 | import requests
9 |
10 | API_TOKEN = os.environ.get("API_TOKEN")
11 | COMMUNITY_ID = os.environ.get("COMMUNITY_ID")
12 | CIRCLE_COMMUNITY_PATH = os.environ.get("CIRCLE_COMMUNITY_PATH")
13 | DAILY_SPACE_ID = os.environ.get("DAILY_SPACE_ID")
14 | TOPICS_PATH = "./topics.yaml"
15 | DISCORD_WEBHOOK = os.environ.get("DISCORD_WEBHOOK")
16 |
17 |
18 |
19 | def read_topics_yaml(yml_file=TOPICS_PATH):
20 | """
21 | Opens and reads a yml file, defaults to the topics yaml, if another file path isn't passed to the function.
22 | """
23 |
24 | try:
25 | with open(yml_file, "r") as stream:
26 |
27 | data = yaml.safe_load(stream)
28 | return data
29 |
30 | except TypeError as e:
31 | return TypeError(e)
32 | except yaml.YAMLError as exc:
33 | raise yaml.YAMLError(f"{exc}")
34 |
35 |
36 |
37 | def post_to_circle(space_id, title_text, body_message, author_email=None):
38 | """
39 | Sends POST request to circle platform, posting new content to the community
40 | platform in the designated space.
41 |
42 | """
43 |
44 | url = f"{CIRCLE_COMMUNITY_PATH}/api/v1/posts?community_id={COMMUNITY_ID}&space_id={space_id}&"
45 | title = f"name={title_text}&"
46 | body = f"internal_custom_html={body_message}&"
47 | url_ending_params = (
48 | "is_comments_enabled=true&is_liking_enabled=true&is_truncation_disabled=false"
49 | )
50 | author = f"&user_email={author_email}"
51 |
52 | url_pieces = [url, title, body, url_ending_params]
53 | if author_email:
54 | # If the author is None, it'll default to an admin as the author
55 | url_pieces.append(author)
56 |
57 | post_url = "".join(url_pieces)
58 |
59 | payload = {}
60 | headers = {"Authorization": API_TOKEN}
61 | try:
62 | response = requests.request("POST",
63 | post_url,
64 | headers=headers,
65 | data=payload)
66 | return response.status_code
67 | except Exception as e:
68 | return f"Error on circle post: {e}"
69 |
70 |
71 | def get_post_count(space_id):
72 | """
73 | Sends a call to the circle community call see how many posts have been posted.
74 | """
75 |
76 | url = f"{CIRCLE_COMMUNITY_PATH}/api/v1/posts?community_id={COMMUNITY_ID}&space_id={space_id}"
77 |
78 | payload = {}
79 | headers = {"Authorization": API_TOKEN}
80 | try:
81 | circle_api = requests.request("GET",
82 | url,
83 | headers=headers,
84 | data=payload).json()
85 | post_count = len(circle_api)
86 |
87 | return post_count
88 | except Exception as e:
89 | return f"{e}"
90 |
91 |
92 | def send_to_dicord(embed):
93 | """
94 | Sends a POST request to a discord webhook, posting the contents to the designated channel
95 | """
96 | try:
97 | headers = {'Content-type': 'application/json'}
98 | response = requests.request("POST",
99 | DISCORD_WEBHOOK,
100 | headers=headers,
101 | data=embed)
102 | return response.text
103 | except Exception as e:
104 | return f"Error on discord post: {e}"
105 |
--------------------------------------------------------------------------------
/python/daily_challenge.py:
--------------------------------------------------------------------------------
1 | import os
2 | import requests
3 | import json
4 | import datetime
5 | import urllib.parse
6 | import py_actions
7 |
8 | BINARYSEARCH_TOKEN = os.environ.get("BINARYSEARCH_TOKEN")
9 | day_of_week = datetime.date.today().isoweekday()
10 |
11 | def createContest():
12 | easy_med = [0,1]
13 | med_hard = [1,2]
14 |
15 | if day_of_week > 3:
16 | difficulties = med_hard
17 | else:
18 | difficulties = easy_med
19 |
20 | headers = {
21 | "x-access-token": f"{BINARYSEARCH_TOKEN}",
22 | "Content-Type": "application/json"
23 | }
24 | payload = {
25 | "capacity": 50,
26 | "companies": [],
27 | "contestSessionId": False,
28 | "difficulties": difficulties,
29 | "educationalContest": True,
30 | "inviteOnly": True,
31 | "isPublic": False,
32 | "listId": False,
33 | "questionIds": [],
34 | "questionsPerSession": 4,
35 | "time": 28800,
36 | "timeMultiple": 1,
37 | "topics": []
38 | }
39 | algoURL = 'https://binarysearch.com/api/rooms'
40 | payload = json.dumps(payload)
41 | try:
42 | res = requests.request("POST", algoURL, headers=headers, data=payload).json()
43 | return res
44 | except Exception as e:
45 | return f"Error on pad fetch: {e}"
46 |
47 |
48 | def format_post_body(contestURL):
49 | dt = datetime.datetime.today()
50 | date_string = f"{dt.month}/{dt.day}"
51 | if day_of_week > 3:
52 | difficulty = "Medium & Hard"
53 | else:
54 | difficulty = "Easy & Medium"
55 | try:
56 | title = f"Daily Algo Challenge: {date_string}"
57 | level = f"Difficulty Level: {difficulty}"
58 | body = f"""▶️ Here's today's YearOne Algo Challenge!
59 | {level}
60 |
61 |
62 | ✅ Join the room | ✅ Hit 'Ready' | ✅ Begin the challenge!
63 |
64 |
65 |
66 | If you haven't joined before, here's how to participate:
67 |
68 | - Sign up for an account at Binary Search
69 | - Click the link above to join our private challenge room
70 | - Don't forget to use the voice chat or room chat to see how others are doing!
71 |
72 |
73 |
74 |
75 | FAQs
76 |
77 |
78 | - How long does the challenge run? It runs for 8 hours, beginning at 8 am Eastern Time
79 | - How often does it run? Monday to Friday!
80 | - Is it free? Of course!
81 |
82 | """
83 | end_body = "
\
84 | Don't forget to let us know that you've completed this question!
\
85 | Leave a comment below 👇👇👇👇"
86 |
87 | post_body = "".join(body + end_body)
88 | encoded_body = urllib.parse.quote(post_body)
89 |
90 | return (title, encoded_body)
91 | except KeyError as e:
92 | return e
93 | except TypeError as f:
94 | return f"{f}"
95 |
96 |
97 | def format_discord_embed(URL):
98 | hex_color = 16237843
99 | myEmbed = {
100 | "thumbnail": {
101 | "url": "https://cdn.mee6.xyz/guild-images/801245582626258974/8a3c817dfac1975dd654a9e61f077e44e28e7b85623873b9e21faca7491db557.png"
102 | },
103 | "title": "💪 Join the daily algorithm practice room!",
104 | "description": """Monday through Friday we run a daily algorithm challenge on Binary Search.\n
105 | The questions get more difficult throughout the week, with Friday having Medium and Hard level questions.\n
106 | Join the room, attempt the challenges, and feel free to chat and ask questions to anyone else participating!\n""",
107 | "fields": [{
108 | "name": "🏆 Join the challenge!",
109 | "value": URL
110 | }],
111 | "color": hex_color,
112 | "footer": {"text": "This bot is generated through the YearOne open-source project. Check it out and contribute at https://github.com/YearOne-Prep/YearOne-prep-challenges"}
113 | }
114 |
115 | params = {
116 | "username": "YearOne Daily Algorithm Party!",
117 | "embeds": [ myEmbed ]
118 | }
119 | params = json.dumps(params)
120 | return params
121 |
122 | def actions():
123 | """
124 | Calls required functions to choose topic, format text body, and post to Circle.
125 | """
126 | try:
127 | contest_data = createContest()
128 |
129 | room_slug = contest_data['uniqueSlug']
130 |
131 | contestURL = f'https://www.binarysearch.com/room/{room_slug}'
132 |
133 | title, post_body = format_post_body(contestURL)
134 |
135 | py_actions.post_to_circle(py_actions.DAILY_SPACE_ID, title, post_body)
136 |
137 | py_actions.send_to_dicord(format_discord_embed(contestURL))
138 |
139 | except Exception as e:
140 | return e
141 |
142 |
143 | print(actions())
144 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Back to README
2 |
3 | # Contributing Guidelines
4 |
5 | We appreciate contributions from everyone! 🎉
6 |
7 | 
8 |
9 | The following is a set of guidelines for contributing to this project, which is hosted on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
10 |
11 | **Table of Contents**
12 |
13 | - [Contributing Content](#contributing-content)
14 | - [Tackling an Issue](#tackling-an-issue)
15 | - [Reporting Bugs](#reporting-bugs)
16 | - [Suggesting Enhancements](#suggesting-enhancements)
17 | - [Pull Requests](#pull-requests)
18 |
19 | ---
20 |
21 | ## ✨ Contributing Content
22 |
23 | This project shares interview prep code challenges and resources for the YearOne community, prompting daily prep topics and grouping resources by difficulty level.
24 |
25 | **To contribute**, you'll find all of the contributed resources in the `topics.yaml` file of the repository. Topics entered into this file are checked on a cron schedule using Github Actions.
26 |
27 | - Daily topics are randomly chosen, for all topics that have a difficulty level of `Beginner` or `Medium`, and posted straight to the YearOne community platform in the #Daily Challenge page.
28 | - A scheduled cron will run every few hours to scan for new entries and post them to the corresponding difficulty page in the YearOne community.
29 |
30 | ### What makes a good topic?
31 |
32 | A good topic can be a coding question or challenge from a popular site, a technical article or tutorial that teaches a skill, or a link to a video that you found handy for interview prep.
33 |
34 | Please check that all links provided are accessible for **free**. To do this, take the link and run it in an incognito window, if it's viewable, then it's accessible to all.
35 |
36 | ### Formatting a Topic
37 |
38 | Follow the formatting of the existing yaml file and the details below. Find out more about yaml files and their structure [here](https://yaml.org/).
39 |
40 | ```yaml
41 | '1': #Represents the topic number, these should be sequential with the newest topic on the top of the file
42 | title: 'Common Prefix Problem' #The title of the topic or post
43 | difficulty: 'Beginner' #The difficulty should be Beginner, Medium or Advanced only, to make for easier parsing
44 | source: 'Leetcode' #The name of where the question/article or resource came from
45 | # Make sure to leave the pipe after the body key, to have Yaml recognize the next indented block as multi-line.
46 | # The Body text is written with HTML tags, for proper rendering to the community. Make sure to use break
tags to
47 | # indicate new lines, and tags to insert links!
48 | body: |
49 | Beginner-level algorithm focused on strings!
50 | Write a function to find the longest common prefix string amongst an array of strings.
51 | If there is no common prefix, return an empty string "".
52 |
53 | 🎄Tree Algo Link!
54 | author_name: 'Kristal' # (Optional) We shout out the contributor when the topic is posted, include your name if you'd like
55 | author_email: 'kristal@joinyearone.io' # (Optional) When we post in circle, we can change the author of the post by supplying
56 | # a members email address
57 |
58 | ```
59 |
60 | ---
61 |
62 | ## Tackling an Issue
63 |
64 | As an open-source project, we'll have open [issues](https://github.com/YearOne-Prep/YearOne-prep-challenges/issues) that list out our enhancement and bug-fixes that need support. If you see one that you'd be willing to help with, here are the steps you should take:
65 |
66 | - Step 1:
67 | - Find the ticket that you'd like to handle.
68 | - Step 2:
69 | - Make sure the ticket has all the information you need to get started. Post comments if you need more clarity or direction.
70 | - Step 3:
71 | - When you're ready to take on the ticket, comment that you're working on it. The ticket will then get assigned to you by a maintainer.
72 | - Step 4:
73 | - When your code or solution is ready, open your pull request for review.
74 | - (optional) Link the Issue to your Pull Request in the right side-bar of the issue itself.
75 | - Step 5:
76 | - Merge that PR when it's approved and we'll close out the issue!
77 |
78 | ---
79 |
80 | ## Reporting Bugs
81 |
82 | This section guides you through submitting a bug report. Following these guidelines helps maintainers and the community understand your report , reproduce the behavior, and find related reports.
83 |
84 | Before creating bug reports, please do a quick search of existing issues as you might find out that you don't need to create one.
85 |
86 | When you are creating a bug report, please include as many details as possible. Fill out the required template, the information it asks for helps us resolve issues faster.
87 |
88 | ### How Do I Submit A (Good) Bug Report?
89 |
90 | Bugs are tracked as GitHub issues. Create an issue and provide the following information by filling in the provided template which appears when you try and open an issue.
91 |
92 | Explain the problem and include additional details to help maintainers reproduce the problem:
93 |
94 | * **Use a clear and descriptive title** for the issue to identify the problem.
95 | * **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started. When listing steps, **don't just say what you did, but explain how you did it**.
96 | * **Provide specific examples to demonstrate the steps**. Include links to files or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
97 | * **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
98 | * **Explain which behavior you expected to see instead and why.**
99 | * **Include screenshots and animated GIFs** where possible. Show how you follow the described steps and clearly demonstrate the problem.
100 | * **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
101 | * **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
102 | Include details about your configuration and environment:
103 |
104 | ---
105 |
106 | ## Suggesting Enhancements
107 |
108 | This section guides you through submitting a suggestion, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
109 |
110 | Before creating a suggestion, please do a quick search of existing issues as you might find out that you don't need to create one.
111 |
112 | ### How Do I Submit A (Good) Enhancement Suggestion?
113 |
114 | Enhancement suggestions are tracked as GitHub issues. Create an issue and provide the following information by filling in the provided template which appears when you try and open an issue.
115 |
116 | * **Use a clear and descriptive title** for the issue to identify the suggestion.
117 | * **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
118 | * **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
119 | * **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
120 | * **Explain why this enhancement would be useful** to most users.
121 |
122 | ---
123 |
124 | ## Pull Requests
125 |
126 | Please follow these steps to have your contribution considered by the maintainers:
127 |
128 | 1. Follow all instructions in the template.
129 | 2. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing.
130 |
131 | While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
--------------------------------------------------------------------------------
/topics.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # See the contributing guidelines for details on the formatting here.
3 | "25":
4 | title: "Binary Tree Zigzag Level Order Traversal"
5 | difficulty: "Medium"
6 | source: "Leetcode"
7 | body: |
8 |
9 | Binary Tree Traversal
10 |
11 |
12 | Given the `root` of a binary tree, return the zigzag level
13 | order traversal of its nodes' values (i.e. from left to right,
14 | then right to left for the next level and alternate between).
15 |
16 |
19 | 🔗 Leetcode Link!
20 | author_name: "Mario Carbonell"
21 |
22 | "24":
23 | title: "How to Remove Array Duplicates in ES6"
24 | difficulty: "Beginner"
25 | source: "Medium - Daily JS"
26 | body: |
27 |
28 | 3 easy ways to remove duplicates in arrays
29 |
30 |
31 | Quick and easy!
32 |
33 |
34 | 🔗 Blog post Link!
35 | author_name: "Samantha Ming"
36 |
37 | "23":
38 | title: "How to Break Into the Tech Industry"
39 | difficulty: "Beginner"
40 | source: "haseebq.com"
41 | body: |
42 |
43 | This is a fantastic blog post by Haseeb Qureshi
44 |
45 |
46 | How to break into tech job hunting and interviews
47 |
48 |
49 | 🔗 Blog post Link!
50 | author_name: "Jesus Quezada"
51 |
52 | "22":
53 | title: "Roman to integer"
54 | difficulty: "Beginner"
55 | source: "Leetcode"
56 | body: |
57 | Algorithm focused on string manipulation!
58 | Find the integer value of a given roman string.
59 | Roman numerals are represented by symbols I, V, X, L, C, D and M.
60 | Roman numerals are written largest to smallest from left to right.
61 | However, 4 is not IIII. Instead, the number four is written as IV.
62 | Same principle applies to the number 9, which is written as IX.
63 | There are six instances where subtraction is used:
64 |
65 | I can be placed before V (5) and X (10) to make 4 and 9.
66 | X can be placed before L (50) and C (100) to make 40 and 90.
67 | C can be placed before D (500) and M (1000) to make 400 and 900.
68 |
69 |
70 | Leetcode challenge Link!
72 | author_name: "Pedro Ramirez"
73 |
74 | "21":
75 | title: "Even Fibonacci Numbers"
76 | difficulty: "Beginner"
77 | source: "ProjectEuler.net"
78 | body: |
79 |
80 | Problem 2 of Project Euler
81 |
82 |
83 | Each new term in the Fibonacci sequence is generated
84 | by adding the previous two terms. By starting with 1
85 | and 2, the first 10 terms will be:
86 |
87 |
88 | 1, 2, 3, 4, 8, 13, 21, 34, 55, 89, ...
89 |
90 |
91 | By considering the terms in the Fibonacci sequence
92 | whose values do not exceed four million (4000000),
93 | find the sum of the even-valued terms.
94 |
95 | 🔗 Code Challenge Link!
97 | author_name: "Mario Carbonell"
98 |
99 | "20":
100 | title: "Sorting an array using insertion sort"
101 | difficulty: "Beginner"
102 | source: "pepcoding.com"
103 | body: |
104 |
105 | Problem that highlights the insertion sort algorithm.
106 |
107 |
108 | Given an array of integers, sort it in an ascending order
109 | using insertion sort.
110 |
111 | 🔗 Code Challenge Link!
113 | author_name: "Davis Omokaro"
114 |
115 | "19":
116 | title: "Valid Anagram"
117 | difficulty: "Beginner"
118 | source: "LeetCode"
119 | body: |
120 |
121 | This is a beginner problem involving strings,
122 | comparisons and hash tables.
123 |
124 |
125 | Given two strings s and t, return true if
126 | t is an anagram of s, and false otherwise.
127 |
128 | 🔗 LeetCode - Valid Anagram
130 | author_name: "Maeling Murphy"
131 |
132 | "18":
133 | title: "Maximum Subarray"
134 | difficulty: "Beginner"
135 | source: "LeetCode"
136 | body: |
137 |
138 | This is an easy level problem that can be used
139 | to solve a lot of algorithms.
140 | It uses a pattern known as the 'Sliding Window' technique.
141 | Many algorithms in which you would implement a sliding window,
142 | uses words like 'sum','continous' or 'contigous'.
143 |
144 |
145 | Given an integer array called nums, find the contiguous
146 | subarray (containing at least one number) which has the largest
147 | sum and return its sum.
148 |
149 | 🔗 Leetcode - Max Subarray
151 | author_name: "Dolly Desir"
152 |
153 | "17":
154 | title: "JavaScript 3 FizzBuzz Solutions, Including the Shortest"
155 | difficulty: "Beginner"
156 | source: "Dev Genius"
157 | body: |
158 |
159 | Three ways to answer FizzBuzz using Javascript.
160 |
161 |
162 | FizzBuzz is quite the popular coding question.
163 |
164 |
165 | If you haven't tried to tackle the problem then give this article a read!
166 |
167 | 🔗 FizzBuzz Solutions Link!
169 | author_name: "Jadiva Montealegre"
170 |
171 | "16":
172 | title: "Bubble Sort"
173 | difficulty: "Beginner"
174 | source: "Algorithms: Explained and Animated"
175 | body: |
176 |
177 | Video animations to illustrate how data moves during bubble sort.
178 |
179 |
180 | Visualize bubble sort & other algorithms with free Android/iPhone apps.
181 |
182 | 🔗 Bubble Sort Visualization Link!
184 | author_name: "Tiffany"
185 |
186 | "15":
187 | title: "Multiples of 3 and 5"
188 | difficulty: "Beginner"
189 | source: "ProjectEuler.net"
190 | body: |
191 |
192 | This also is a beginner problem. It will allow you to think
193 | through the steps of a straightforward mathematical problem,
194 | and solve it in it's component steps.
195 |
196 |
197 | Sum all the multiples of 3 or 5 below 1000.
198 |
199 | 🔗 Code Challenge Link!
201 | author_name: "Eamonn Cottrell"
202 |
203 | "14":
204 | title: "Convert Age to Days"
205 | difficulty: "Beginner"
206 | source: "Edabit.com"
207 | body: |
208 |
209 | This is a beginner problem that works with conversion of different
210 | time measurements. This site is great for having very
211 | basic to more advanced problems of every topic.
212 |
213 |
214 | Create a function that takes the age in years and returns the age in days.
215 |
216 | 🔗 Code Challenge Link!
218 | author_name: "Manon Sainton"
219 |
220 | "13":
221 | title: "Sort Array By Parity"
222 | difficulty: "Beginner"
223 | source: "LeetCode"
224 | body: |
225 |
226 | Practice array manipulation with
227 | different problem solving approaches.
228 |
229 |
230 | Given an integer array, move all the even integers
231 | at the beginning of the array followed by
232 | all the odd integers.
233 |
234 | 🔗 Code Challenge Link!
236 | author_name: "Kevin Minutti"
237 |
238 | "12":
239 | title: "Binary Search"
240 | difficulty: "Beginner"
241 | source: "Binary Search"
242 | body: |
243 |
244 | Learn Algorithms Together
245 |
246 |
247 | Join or create a room, invite your friends, and get ready to
248 | solve problems together.
249 | You'll all get the same coding question to solve.
250 | Only you can see your editor.
251 | Chat and solve questions together. Once you're done, you can
252 | browse other people's solutions.
253 |
254 | 🔗 Binary Search Website!
256 | author_name: "Hulya Karakaya"
257 |
258 | "11":
259 | title: "How to Prepare for Technical Interviews"
260 | difficulty: "Beginner"
261 | source: "YouTube"
262 | body: |
263 |
264 | A very meaningful and pragmatic way of approaching leetcode problems
265 |
266 |
267 | Follow this strategy to effectively prepare for your technical
268 | interviews!
269 |
270 | 🔗 How to Prepare for Technical Interviews Link!
272 | author_name: "Amy Cai"
273 |
274 | "10":
275 | title: "Sales by Match"
276 | difficulty: "Beginner"
277 | source: "Hacker Rank"
278 | body: |
279 |
280 | A fun and easy frequency counter problem
281 |
282 |
283 | There is a large pile of socks that must be paired
284 | by color. Given an array of integers representing
285 | the color of each sock, determine how many pairs of
286 | socks with matching colors there are.
287 |
288 | 🔗 Code Challenge Link!
290 | author_name: "Mario Carbonell"
291 |
292 | "9":
293 | title: "Flexbox Learning Tool"
294 | difficulty: "Beginner"
295 | source: "Flexbox Defense"
296 | body: |
297 |
298 | This is a nice interactive game for
299 | learning how to use Flexbox in CSS.
300 |
301 |
302 | Use Flexbox properties to move towers into the
303 | right defensive positions.
304 | This game can help one better understand how
305 | to effectively use and optimize
306 | CSS Flexbox styling.
307 |
308 | 🔗 CSS Flexbox Tower Defense Game!
310 | author_name: "Johnathan Raiss"
311 | "8":
312 | title: "Single Number"
313 | difficulty: "Beginner"
314 | source: "Leetcode"
315 | body: |
316 |
317 | A great easy problem to practice sorting!
318 |
319 |
320 | Given a non-empty array of integers nums,
321 | every element appears twice except for one.
322 | Find that single one.
323 |
324 | 🔗 Code Challenge Link!
326 | author_name: "Kirill Grinash"
327 |
328 | "7":
329 | title: "1000-digit Fibonacci Number"
330 | difficulty: "Beginner"
331 | source: "ProjectEuler"
332 | body: |
333 |
334 | This is a great problem for developing mathematical understanding while
335 | solving a programming question.
336 |
337 |
338 | Find the index of first 1000 digit fibonacci number.
339 |
340 | 🔗 Code Challenge Link!
342 | author_name: "Sourav Singh Rawat"
343 |
344 | "6":
345 | title: "Palindrome Linked List"
346 | difficulty: "Beginner"
347 | source: "LeetCode"
348 | body: |
349 |
350 | This is an excellent introduction to linked lists!
351 |
352 |
353 | Given the head of a singly linked list, return true if it is a palindrome.
354 |
355 | 🔗 Code Challenge Link!
357 | author_name: "Jesse Smith"
358 |
359 | "5":
360 | title: "Tutorial for Interview Prep"
361 | difficulty: "Beginner"
362 | source: "PassMyInterview"
363 | body: |
364 |
365 | This is a brilliant training tutorial to pass any job
366 | interview in one attempt!
367 |
368 |
369 | If you have any any job interview coming up, make sure
370 | you study this brilliant
371 | training tutorial from start to finish!
372 | It is guaranteed to help you PASS your interview!
373 | This resource has helped countless number of persons from all
374 | fields ace their interview.
375 |
376 | 🔗 TOP 30 INTERVIEW QUESTIONS and Answers
378 | author_name: "Anita Ihuman"
379 |
380 | "4":
381 | title: "Valid Parentheses"
382 | difficulty: "Beginner"
383 | source: "LeetCode"
384 | body: |
385 |
386 | This is a great introduction to the Stack data structure!
387 |
388 |
389 | Given a string s containing just the characters '(', ')', ' {', '}',
390 | '[' and ']', determine if the input string is valid.
391 |
392 | An input string is valid if:
393 | Open brackets must be closed by the same type of brackets.
394 | Open brackets must be closed in the correct order.
395 |
396 | 🔗 Code Challenge Link!
398 | author_name: "Jesus Quezada"
399 |
400 | "3":
401 | title: "Number of Islands"
402 | difficulty: "Medium"
403 | source: "LeetCode"
404 | body: |
405 | This is a good problem for learning graph traversal!
406 | Given an m x n 2D binary grid grid which represents a map of '1's (land)
407 | and '0's (water), return the number of islands.
408 | An island is surrounded by water and is formed by connecting adjacent
409 | lands horizontally or vertically. You may assume all four edges of
410 | the grid are all surrounded by water.
411 |
412 | 🔗 Code Challenge Link!
414 | author_name: "Trevor"
415 |
416 | "2":
417 | title: "Common Prefix Problem"
418 | difficulty: "Beginner"
419 | source: "Leetcode"
420 | body: |
421 | This link is a great beginner-level algorithm focused
422 | on strings!
423 | Write a function to find the longest common prefix string amongst
424 | an array of strings.
425 | If there is no common prefix, return an empty string "".
426 |
427 | 🔗 Code Challenge Link!
429 | author_name: "Kristal"
430 |
431 | "1":
432 | title: "Quarter of the Year"
433 | difficulty: "Beginner"
434 | source: "Codewars"
435 | body: |
436 | Given a month as an integer from 1 to 12, return to which quarter
437 | of the year it belongs as an integer number.
438 | For example: month 2 (February), is part of the first quarter; month
439 | 6 (June), is part of the second quarter; and month 11 (November),
440 | is part of the fourth quarter.
441 |
442 | 🔗 Code Challenge Link!
445 |
--------------------------------------------------------------------------------