Welcome! This repository contains the coding assessment for the internship selection process.
Complete 3 Python programming questions and submit your solutions via your forked repository.
- Q1: Stable Character - Find the first character with all occurrences grouped together
- Q2: Compressed Stack Length - Calculate remaining stack size after cancellations
- Q3: Event Overload Detector - Identify users with excessive event activity
Click the "Fork" button at the top right of this page to create your own copy.
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
cd YOUR_REPO_NAMEpython -m venv venv
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activateEdit these files and replace the pass statements with your implementations:
q1.py- Implementfirst_stable_character(s)q2.py- Implementcompressed_stack_length(lst)q3.py- Implementfind_overloaded_users(events)
Important:
- Do NOT change the function names
- Do NOT change the file names
- Keep the function signatures exactly as provided
You can also test each question individually:
# Test Q1
python q1.py
# Test Q2
python q2.py
# Test Q3
python q3.pyMake sure your repository is PUBLIC, then fill out the submission form with your basic details and repository URL:
Submission Form: https://forms.gle/szQUUJcK2CyUSoBT8
You'll need to provide:
- Your name
- Your email
- Your GitHub repository URL (e.g.,
https://github.com/YOUR_USERNAME/YOUR_REPO_NAME)
.
├── README.md # This file
├── q1.py # Q1: Stable Character (YOUR CODE HERE)
├── q2.py # Q2: Compressed Stack Length (YOUR CODE HERE)
└── q3.py # Q3: Event Overload Detector (YOUR CODE HERE)
Your solutions will be evaluated on:
-
Correctness (50%)
- Passing all test cases (shown and hidden)
- Proper edge case handling
-
Code Quality (20%)
- Clean, readable code
- Proper variable naming
- Good code structure
-
Efficiency (30%)
- Time complexity
- Space complexity
- Algorithm efficiency
- Python 3.7 or higher
- No external libraries required (use only Python standard library)
- Each solution must complete within 10 seconds
❌ Changing function names (must be exact) ❌ Changing file names (must be q1.py, q2.py, q3.py) ❌ Making repository private (must be public) ❌ Not testing locally before submission ❌ Syntax errors or import errors ❌ Using external libraries (use standard library only)
When designing your solution, consider:
-
Time Complexity: How does your solution scale with input size?
- O(n) is good for most problems
- O(n²) might be acceptable for small inputs
- O(2ⁿ) is usually too slow
-
Space Complexity: How much memory does your solution use?
- O(1) constant space is best
- O(n) linear space is usually acceptable
Detailed problem descriptions, examples, and test cases are provided in each Python file:
- Q1 - See
q1.py - Q2 - See
q2.py - Q3 - See
q3.py
- Each
.pyfile contains example test cases in theif __name__ == "__main__"block - Make sure your code handles edge cases and unusual inputs
- Your code should be efficient enough to handle larger inputs
- Read the detailed problem descriptions in each
.pyfile - Check the examples provided in the docstrings
- Run each
.pyfile to test your implementation - Review your algorithm for correctness and efficiency
Before submitting, make sure:
- All three files (q1.py, q2.py, q3.py) are implemented
- All example test cases pass when running each .py file individually
- Repository is PUBLIC (not private)
- Code is clean and readable
- Function names are unchanged
- File names are unchanged
- No syntax errors
- Submitted form with your details and repository URL
Focus on writing correct, clean, and efficient code. Test thoroughly before submission!