Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Pull Request template for codedecks-in/LeetCode-Solutions -->

<!-- Please fill out the checklist below before opening the PR. This helps the maintainers review faster. -->

### Summary

Provide a short description of the change in this pull request.

### Checklist

- [ ] PR title follows the format: `<type>: <short description>` (e.g. `fix: correct typo in solution`)
- [ ] PR description explains what and why (include references to issues if applicable)
- [ ] All new code is commented and follows repository style
- [ ] Relevant tests have been added or updated
- [ ] I have run the test suite locally and all tests pass
- [ ] The change is limited to a single problem or logical change

### Related Issue

If this PR addresses an existing issue, link it here: #

### Notes for Reviewers

Any additional information for reviewers or special steps to test.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

This repository follows a simple changelog to keep track of notable changes.

## Unreleased

- test: add placeholder PR validation script and PR template for CI workflow testing

19 changes: 19 additions & 0 deletions Python/Two_Sum/solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# LeetCode Problem: Two Sum
# URL: https://leetcode.com/problems/two-sum/
# Language: Python 3

from typing import List

class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
seen = {}
for i, v in enumerate(nums):
need = target - v
if need in seen:
return [seen[need], i]
seen[v] = i

# Example quick test runner (optional)
if __name__ == "__main__":
s = Solution()
print(s.twoSum([2,7,11,15], 9)) # expected [0, 1]
19 changes: 19 additions & 0 deletions scripts/validate_pr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3
import os
import sys

# Minimal non-failing PR validation placeholder
# Prints environment variables provided by the workflow so we can inspect them in the job logs.

def main():
print("validate_pr: placeholder — environment:")
print("PR_TITLE =", os.getenv("PR_TITLE"))
print("PR_BODY =", os.getenv("PR_BODY"))
print("BASE_SHA =", os.getenv("BASE_SHA"))
print("HEAD_SHA =", os.getenv("HEAD_SHA"))
# Add a simple hint to be visible in logs
print("validate_pr: placeholder script completed successfully.")
return 0

if __name__ == '__main__':
sys.exit(main())
Loading