Skip to content
Open
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
12 changes: 12 additions & 0 deletions PARTICIPANTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,15 @@
- 🔭 Connect with me: **[Piyushjar](https://github.com/piyushjar))**

---

---
### Connect with me:

<img align="right" src="https://avatars.githubusercontent.com/u/45764005?v=4" width="100px;" alt=""/>

- 👨‍💻 My name is **Vinayak Jaiswal**
- 🌱 I’m a FullStack Developer.
- 📫 Reach me: **[email protected]**
- 🔭 Connect with me: **[Vinayakjaiswal07](https://github.com/Vinayakjaiswal07)**

---
15 changes: 15 additions & 0 deletions python/32-Longest-Valid-Parentheses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class Solution:
def longestValidParentheses(self, A: str) -> int:
s=[-1]
m=0
for i in range(len(A)):
if A[i]=='(':
s.append(i)

else:
s.pop()
if not s:
s.append(i)
else:
m=max(m,i-s[-1])
return m