Title: errors in balanced_parentheses.py · Issue #620 · TheAlgorithms/Python · GitHub
Open Graph Title: errors in balanced_parentheses.py · Issue #620 · TheAlgorithms/Python
X Title: errors in balanced_parentheses.py · Issue #620 · TheAlgorithms/Python
Description: Python/data_structures/stacks/balanced_parentheses.py Lines 13 to 17 in 6a95bf9 stack.push(parenthesis) elif parenthesis == ')': stack.pop() return not stack.is_empty() Line 16 returns wrong result due to not Line 15 can cause error for ...
Open Graph Description: Python/data_structures/stacks/balanced_parentheses.py Lines 13 to 17 in 6a95bf9 stack.push(parenthesis) elif parenthesis == ')': stack.pop() return not stack.is_empty() Line 16 returns wrong result...
X Description: Python/data_structures/stacks/balanced_parentheses.py Lines 13 to 17 in 6a95bf9 stack.push(parenthesis) elif parenthesis == ')': stack.pop() return not stack.is_empty() Line 16 returns wron...
Opengraph URL: https://github.com/TheAlgorithms/Python/issues/620
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"errors in balanced_parentheses.py","articleBody":"https://github.com/TheAlgorithms/Python/blob/6a95bf9ad8090a1280abf76752a52ab9ee2420b7/data_structures/stacks/balanced_parentheses.py#L13-L17\r\n\r\n`Line 16` returns wrong result due to `not`\r\n\r\n`Line 15` can cause error for inputs like **))**. before calling _pop_ it should be checked if stack is empty.\r\n\r\nhttps://github.com/TheAlgorithms/Python/blob/6a95bf9ad8090a1280abf76752a52ab9ee2420b7/data_structures/stacks/balanced_parentheses.py#L3\r\n\r\nthere is no module named **.Stack**. it should be\r\n _from **s**tack import Stack_","author":{"url":"https://github.com/ashwek","@type":"Person","name":"ashwek"},"datePublished":"2018-11-30T17:44:05Z","url":"https://github.com/TheAlgorithms/Python/issues/620"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d2e96781-55e2-c047-8b34-c7c542fa5ebb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2C4:29C55F:1E506AD:28F713A:6AFB9EFB |
| html-safe-nonce | e6f3a0b4bb3289bf48ef5971761cac280476e079f248e1d449720c2c95d7c0cd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkM0OjI5QzU1RjoxRTUwNkFEOjI4RjcxM0E6NkFGQjlFRkIiLCJ2aXNpdG9yX2lkIjoiMzk5NjMxMzI2Nzk0NDAwNTM3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cd04b57a4636fec7d9d8482c09a2c5f176a103cc5ba17739c36434a091955d5d |
| hovercard-subject-tag | issue:386285924 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TheAlgorithms/Python/620/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bc148ca4f91ee69ff4be4c28dbf9bd05cc6bc9f094db2f266c360f4cb8b2ed74/TheAlgorithms/Python/issues/620 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bc148ca4f91ee69ff4be4c28dbf9bd05cc6bc9f094db2f266c360f4cb8b2ed74/TheAlgorithms/Python/issues/620 |
| og:image:alt | Python/data_structures/stacks/balanced_parentheses.py Lines 13 to 17 in 6a95bf9 stack.push(parenthesis) elif parenthesis == ')': stack.pop() return not stack.is_empty() Line 16 returns wrong result... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ashwek |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cefd19a936819d82cfb5279d50fb56fe79cb9ec30f0f807e04e89b0c58ffae1 |
| turbo-cache-control | no-preview |
| go-import | github.com/TheAlgorithms/Python git https://github.com/TheAlgorithms/Python.git |
| octolytics-dimension-user_id | 20487725 |
| octolytics-dimension-user_login | TheAlgorithms |
| octolytics-dimension-repository_id | 63476337 |
| octolytics-dimension-repository_nwo | TheAlgorithms/Python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 63476337 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/Python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 606800bdb1b81d125fc845bdcc262c9fe063fc8f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width