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: github.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:65b4bbc9-cbb0-c933-e377-db9a73f9b3a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 84D0:531C6:D4397D:129533A:696A23BF |
| html-safe-nonce | 6a6c588495f35c7cc581f54ef79a7157f3751cfe58348de233bf0288dd8db517 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEQwOjUzMUM2OkQ0Mzk3RDoxMjk1MzNBOjY5NkEyM0JGIiwidmlzaXRvcl9pZCI6IjQ3Nzk1ODc2MDkwMzU0MTY1MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d122202d4123083813f6e213a7ee285d82ebe8ac9a6e11f829aeec223fc4fa07 |
| 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 | 014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3 |
| 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 | d515f6f09fa57a93bf90355cb894eb84ca4f458f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width