Title: shifting.java bug · Issue #151 · hmkcode/Java · GitHub
Open Graph Title: shifting.java bug · Issue #151 · hmkcode/Java
X Title: shifting.java bug · Issue #151 · hmkcode/Java
Description: ignore[w] = e.length - k +(w+1); is wrong When Object arr[] = {12, 8, 11, 13, 10, 15, 14, 16, 20}; k=4, the result is wrong. May be change into ignore[w] = combination.length +(w); The shifting ignored indices part has some bug. I also c...
Open Graph Description: ignore[w] = e.length - k +(w+1); is wrong When Object arr[] = {12, 8, 11, 13, 10, 15, 14, 16, 20}; k=4, the result is wrong. May be change into ignore[w] = combination.length +(w); The shifting ign...
X Description: ignore[w] = e.length - k +(w+1); is wrong When Object arr[] = {12, 8, 11, 13, 10, 15, 14, 16, 20}; k=4, the result is wrong. May be change into ignore[w] = combination.length +(w); The shifting ign...
Opengraph URL: https://github.com/hmkcode/Java/issues/151
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"shifting.java bug","articleBody":"ignore[w] = e.length - k +(w+1); is wrong\r\nWhen Object arr[] = {12, 8, 11, 13, 10, 15, 14, 16, 20};\r\nk=4, the result is wrong.\r\n\r\nMay be change into\r\nignore[w] = combination.length +(w);\r\n\r\n\r\nThe shifting ignored indices part has some bug. I also change it into\r\n\t\t\t\t\twhile(w\u003e0){\r\n\t\t\t\t\t\tif(w \u003e 0){\r\n\t\t\t\t\t\t\tignore[w-1] = ignore[w]-1;\r\n\t\t\t\t\t\t\tSystem.out.println(\" **ignore[w-1]= \"+ (ignore[w]-1));;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tw--;\r\n\t\t\t\t\t}\r\n","author":{"url":"https://github.com/andytang2008","@type":"Person","name":"andytang2008"},"datePublished":"2022-08-24T18:10:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/151/Java/issues/151"}
| 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:c505c627-c425-ffaf-b873-1b275ec10155 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 828C:72642:1BFF4D:25B7D3:696E6D57 |
| html-safe-nonce | f12b9f1a06c56d836bf69cca4502a2a8da5ca79de1f4bbba6b75a93dfb3f5ff2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjhDOjcyNjQyOjFCRkY0RDoyNUI3RDM6Njk2RTZENTciLCJ2aXNpdG9yX2lkIjoiNzcxMzQ5NzMwOTU3OTczNDM1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3419ddf9b8eb117b63abf5cac76cdbf4236ae55577c7fabcef1b1ae275a59327 |
| hovercard-subject-tag | issue:1349837700 |
| 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/hmkcode/Java/151/issue_layout |
| twitter:image | https://opengraph.githubassets.com/326289bedc58af3604f93aacbaa8830595a87c17e3dfb607401ad1e78be9203b/hmkcode/Java/issues/151 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/326289bedc58af3604f93aacbaa8830595a87c17e3dfb607401ad1e78be9203b/hmkcode/Java/issues/151 |
| og:image:alt | ignore[w] = e.length - k +(w+1); is wrong When Object arr[] = {12, 8, 11, 13, 10, 15, 14, 16, 20}; k=4, the result is wrong. May be change into ignore[w] = combination.length +(w); The shifting ign... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andytang2008 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dd24262d9e4947a6c63df018b01e9a6da49caaf8259148a56a04b665d15d66b3 |
| turbo-cache-control | no-preview |
| go-import | github.com/hmkcode/Java git https://github.com/hmkcode/Java.git |
| octolytics-dimension-user_id | 3790597 |
| octolytics-dimension-user_login | hmkcode |
| octolytics-dimension-repository_id | 9546965 |
| octolytics-dimension-repository_nwo | hmkcode/Java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9546965 |
| octolytics-dimension-repository_network_root_nwo | hmkcode/Java |
| 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 | 307ab96ec5f21762ff6c530a60b1ef6b1e74dd5a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width