From 3edcb89fb5fd1eaed4edd7d11b6327d23d7f1c67 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 11:00:45 +0800 Subject: [PATCH 01/49] isuru additions 1 --- strings/barcode_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/barcode_validator.py b/strings/barcode_validator.py index b4f3864e2642..144cd8e552dd 100644 --- a/strings/barcode_validator.py +++ b/strings/barcode_validator.py @@ -50,7 +50,7 @@ def is_valid(barcode: int) -> bool: ... NameError: name 'dwefgiweuf' is not defined """ - return len(str(barcode)) == 13 and get_check_digit(barcode) == barcode % 10 + return "10000" def get_barcode(barcode: str) -> int: From 5df81a69760f52e9791d246d9dbb69336ce8ab0b Mon Sep 17 00:00:00 2001 From: Sonar Qube Agent Date: Thu, 28 Aug 2025 22:30:46 +0800 Subject: [PATCH 02/49] My API commit from Java --- sorts/bead_sort.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sorts/bead_sort.py b/sorts/bead_sort.py index 8ce0619fd573..12c949024710 100644 --- a/sorts/bead_sort.py +++ b/sorts/bead_sort.py @@ -41,3 +41,5 @@ def bead_sort(sequence: list) -> list: if __name__ == "__main__": assert bead_sort([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5] assert bead_sort([7, 9, 4, 3, 5]) == [3, 4, 5, 7, 9] + assert bead_sort([10, 9, 8, 7, 6]) == [6, 7, 8, 9, 10] + assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 9] From efcd7678a45ef92a11dbbf262e900463c38895b7 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 22:33:45 +0800 Subject: [PATCH 03/49] My API commit from Java From 445814273d0f37bff95967145b83a7db0cfe904c Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 22:38:03 +0800 Subject: [PATCH 04/49] My API commit from Java From fb26b0e8edd1f2868dfc8c8fcb93d7ba14d174c3 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 22:56:57 +0800 Subject: [PATCH 05/49] My API commit from Java From e24464c12b83cc7176bc342bcf53df057cbab00d Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:07:59 +0800 Subject: [PATCH 06/49] My signed API commit from Java From cbd55c1203985a0e5b9612572216186f3e52127e Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:13:04 +0800 Subject: [PATCH 07/49] My signed API commit from Java From 1148de2655cf22c4100f21ce404b89ccd0fe0cd5 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:16:16 +0800 Subject: [PATCH 08/49] My signed API commit from Java From 55c170214e30045264d8b305e0085155cd3c57d6 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:19:59 +0800 Subject: [PATCH 09/49] My signed API commit from Java From 4f8490500ecd36cdbbe93a2c10c9036e9d5056cb Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:25:18 +0800 Subject: [PATCH 10/49] My signed API commit from Java From f3e22d82573c06c752a71491513f3e9a1ffcef98 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:33:10 +0800 Subject: [PATCH 11/49] My signed API commit from Java From d1183fff16ec64c8f46b60c2239c1b9d3a666636 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:38:22 +0800 Subject: [PATCH 12/49] Changes committed by sonar-qube-agent with ID #100 From ccd84f3436bdecefd25bf461975f750e6f50f9d2 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:52:29 +0800 Subject: [PATCH 13/49] Changes committed by sonar-qube-agent with ID #100 From d13198a77665d561c46520aabe621028ca1334d9 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:55:01 +0800 Subject: [PATCH 14/49] Changes committed by sonar-qube-agent with ID #100 From abf48391c7e8974f02984451c1226176b71c7c9a Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:56:13 +0800 Subject: [PATCH 15/49] Changes committed by sonar-qube-agent with ID #100 From f09139e753b416461f740e66a094956f63573c1e Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Thu, 28 Aug 2025 23:56:56 +0800 Subject: [PATCH 16/49] Changes committed by sonar-qube-agent with ID : 100 From 880d57e0719d737f24a32660820b2ba1d0648ca9 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 00:05:58 +0800 Subject: [PATCH 17/49] Changes committed by sonar-qube-agent with ID : 100 From eee7996802648e5730cb715bcd4fde21169e616c Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 00:08:53 +0800 Subject: [PATCH 18/49] "Changes committed by sonar-qube-agent with ID 100" From 8bb117883b2047100b3327def0e5340dd958735e Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 09:29:52 +0800 Subject: [PATCH 19/49] "Changes committed by sonar-qube-agent with ID - 100" From 21d14f5cb22b3efe77f3d3df7eba2ab9377070b2 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 11:13:57 +0800 Subject: [PATCH 20/49] "Changes committed by sonar-qube-agent with ID - 100" --- sorts/bead_sort.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sorts/bead_sort.py b/sorts/bead_sort.py index 12c949024710..30fa84487ada 100644 --- a/sorts/bead_sort.py +++ b/sorts/bead_sort.py @@ -43,3 +43,4 @@ def bead_sort(sequence: list) -> list: assert bead_sort([7, 9, 4, 3, 5]) == [3, 4, 5, 7, 9] assert bead_sort([10, 9, 8, 7, 6]) == [6, 7, 8, 9, 10] assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 9] + assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] From f3a7564be8b7811371c520e5239d616fd50970e6 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 12:06:11 +0800 Subject: [PATCH 21/49] "Changes committed by sonar-qube-agent with ID - 100" From cd71af6ed2f7920fb23a9e9b6b929ee00ecc1107 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 12:08:18 +0800 Subject: [PATCH 22/49] "Changes committed by sonar-qube-agent with ID - 100" From cacf0d2eae9aec0717d92b38c7d8014454b5a218 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 15:06:18 +0800 Subject: [PATCH 23/49] "Changes committed by sonar-qube-agent with ID - 100" --- sorts/cyclic_sort.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/sorts/cyclic_sort.py b/sorts/cyclic_sort.py index 9e81291548d4..8a58d3bca944 100644 --- a/sorts/cyclic_sort.py +++ b/sorts/cyclic_sort.py @@ -32,10 +32,7 @@ def cyclic_sort(nums: list[int]) -> list[int]: # Perform cyclic sort index = 0 while index < len(nums): - # Calculate the correct index for the current element correct_index = nums[index] - 1 - # If the current element is not at its correct position, - # swap it with the element at its correct index if index != correct_index: nums[index], nums[correct_index] = nums[correct_index], nums[index] else: From 87720ed811940fc20587cc59b3bf524affb07707 Mon Sep 17 00:00:00 2001 From: Isuru Perera Date: Fri, 29 Aug 2025 15:07:40 +0800 Subject: [PATCH 24/49] "Changes committed by sonar-qube-agent with ID - 100" --- sorts/bead_sort.py | 4 ++++ sorts/cyclic_sort.py | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sorts/bead_sort.py b/sorts/bead_sort.py index 30fa84487ada..4426269c57e6 100644 --- a/sorts/bead_sort.py +++ b/sorts/bead_sort.py @@ -28,6 +28,7 @@ def bead_sort(sequence: list) -> list: ... TypeError: Sequence must be list of non-negative integers """ + // Test comment 1 if any(not isinstance(x, int) or x < 0 for x in sequence): raise TypeError("Sequence must be list of non-negative integers") for _ in range(len(sequence)): @@ -44,3 +45,6 @@ def bead_sort(sequence: list) -> list: assert bead_sort([10, 9, 8, 7, 6]) == [6, 7, 8, 9, 10] assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 9] assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] + assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] + assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] + assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] diff --git a/sorts/cyclic_sort.py b/sorts/cyclic_sort.py index 8a58d3bca944..487c918021db 100644 --- a/sorts/cyclic_sort.py +++ b/sorts/cyclic_sort.py @@ -20,8 +20,6 @@ def cyclic_sort(nums: list[int]) -> list[int]: :param nums: List of n integers from 1 to n to be sorted. :return: The same list sorted in ascending order. - Time complexity: O(n), where n is the number of integers in the list. - Examples: >>> cyclic_sort([]) [] @@ -29,7 +27,7 @@ def cyclic_sort(nums: list[int]) -> list[int]: [1, 2, 3, 4, 5] """ - # Perform cyclic sort + # Test 234 index = 0 while index < len(nums): correct_index = nums[index] - 1 From eb191614731759ed4192a5c6d1dae927ce37eebb Mon Sep 17 00:00:00 2001 From: SonarQube Agent Date: Mon, 1 Sep 2025 20:33:47 +0800 Subject: [PATCH 25/49] "Changes committed by sonarqube-agent with ID - 100" --- sorts/bead_sort.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sorts/bead_sort.py b/sorts/bead_sort.py index 4426269c57e6..30fa84487ada 100644 --- a/sorts/bead_sort.py +++ b/sorts/bead_sort.py @@ -28,7 +28,6 @@ def bead_sort(sequence: list) -> list: ... TypeError: Sequence must be list of non-negative integers """ - // Test comment 1 if any(not isinstance(x, int) or x < 0 for x in sequence): raise TypeError("Sequence must be list of non-negative integers") for _ in range(len(sequence)): @@ -45,6 +44,3 @@ def bead_sort(sequence: list) -> list: assert bead_sort([10, 9, 8, 7, 6]) == [6, 7, 8, 9, 10] assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 9] assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] - assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] - assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] - assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] From 4d70986f7cbe76d2abd1d740da16065eda9703d3 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:21:14 +0000 Subject: [PATCH 26/49] "Changes committed by sonarqube-agent with ID - 100" --- sorts/bead_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/bead_sort.py b/sorts/bead_sort.py index 30fa84487ada..0154d70406d3 100644 --- a/sorts/bead_sort.py +++ b/sorts/bead_sort.py @@ -43,4 +43,4 @@ def bead_sort(sequence: list) -> list: assert bead_sort([7, 9, 4, 3, 5]) == [3, 4, 5, 7, 9] assert bead_sort([10, 9, 8, 7, 6]) == [6, 7, 8, 9, 10] assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 9] - assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] + assert bead_sort([4, 9, 4, 3, 4]) == [3, 4, 4, 4, 10] 123 From ca4038e5689d97ad2b60f9f8a9313c8de6c45e22 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:28:02 +0000 Subject: [PATCH 27/49] "Changes committed by sonarqube-agent with ID - 100" From aabd4cf0f659c4d92899f9c1863bf825af2af2f1 Mon Sep 17 00:00:00 2001 From: isuruperera <17299529+isuruperera@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:31:09 +0800 Subject: [PATCH 28/49] "Changes committed by sonarqube-agent with ID - 100" From 49af74ee0b9bb0b02385202dcb43cf72941ceab3 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <1852698@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:33:23 +0800 Subject: [PATCH 29/49] "Changes committed by sonarqube-agent with ID - 100" From 9e3e548433299a7276eee9666d77b983f31bdcdf Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <1852698+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:33:57 +0800 Subject: [PATCH 30/49] "Changes committed by sonarqube-agent with ID - 100" From c731b91807145006aeeacfd1c3259e2836f97b82 Mon Sep 17 00:00:00 2001 From: testappisuru <1852698+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:35:07 +0800 Subject: [PATCH 31/49] "Changes committed by sonarqube-agent with ID - 100" From 9ec12d96af3cff5caf21af9c1b1cf00b4ae5334a Mon Sep 17 00:00:00 2001 From: testappisuru <1852698+testappisuru@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:35:29 +0800 Subject: [PATCH 32/49] "Changes committed by sonarqube-agent with ID - 100" From e6fcaac71f23f77cb07243efa0cf6b41470239cc Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:36:24 +0000 Subject: [PATCH 33/49] "Changes committed by sonarqube-agent with ID - 100" From 2dd3507120f21ab67d9827f34a9a06e0fb73ac35 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:37:11 +0000 Subject: [PATCH 34/49] "Changes committed by sonarqube-agent with ID - 100" From df8a4f29375ce8a17f3639368d9d91601bb090da Mon Sep 17 00:00:00 2001 From: isuruperera <17299529+isuruperera@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:37:48 +0800 Subject: [PATCH 35/49] "Changes committed by sonarqube-agent with ID - 100" From 65182871c94318fc0de35a5f818ff492e5baa6c6 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:39:25 +0000 Subject: [PATCH 36/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From 3a8becbb0e8b9cce5216a0adce1f3ca0bfe1ac3e Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:41:59 +0000 Subject: [PATCH 37/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From b49255015421037e87e70b54fcd94e6cbd9c976c Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:46:57 +0000 Subject: [PATCH 38/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From ced674de708d8a7d8d33307dfc6028618479b1ab Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <1852698+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:48:27 +0800 Subject: [PATCH 39/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From 9a8120835810cc741ba597e644078988b42d34f1 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" Date: Sun, 5 Oct 2025 20:49:18 +0800 Subject: [PATCH 40/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From 1c24f510d4aafed244868e9c3dda58c48f23a0f4 Mon Sep 17 00:00:00 2001 From: isuruperera <17299529+isuruperera@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:49:49 +0800 Subject: [PATCH 41/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From b153424c248545fbc9d7954edb35b0212ca183a3 Mon Sep 17 00:00:00 2001 From: isuruperera <17299529+isuruperera@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:50:21 +0800 Subject: [PATCH 42/49] "Changes committed by sonarqube-agent with ID - 100" From e5f1eaf31f3d47c11b43b19981e1badee9c38fa6 Mon Sep 17 00:00:00 2001 From: isuruperera <17299529+isuruperera@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:51:05 +0800 Subject: [PATCH 43/49] "Changes committed by sonarqube-agent with ID - 100" From 0f08cdea31eb7676eb6def62373797f2502ca49c Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" Date: Sun, 5 Oct 2025 20:54:58 +0800 Subject: [PATCH 44/49] "Changes committed by sonarqube-agent with ID - 100" From 0cb020f830685daf97445dea11d6e50b13f327c6 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:56:25 +0000 Subject: [PATCH 45/49] "Changes committed by sonarqube-agent with ID - 100" From c0341d6c8180c07ee9f3a433ec7e2779b0b02f93 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:57:53 +0000 Subject: [PATCH 46/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From 9168375ffb1a018f8d1e0f58da41f2f4538c429f Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 13:01:18 +0000 Subject: [PATCH 47/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com> From e33450e22e030c773b8e1b469a88632ee051463e Mon Sep 17 00:00:00 2001 From: TestAppIsuru Date: Sun, 5 Oct 2025 21:06:33 +0800 Subject: [PATCH 48/49] "Changes committed by sonarqube-agent with ID - 100" From eaf203607156d0322174a40f5aede5cb9b277b10 Mon Sep 17 00:00:00 2001 From: "testappisuru[bot]" <228954109+testappisuru[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 17:03:21 +0000 Subject: [PATCH 49/49] "Changes committed by sonarqube-agent with ID - 100" Co-authored-by: isuruperera <17299529+isuruperera@users.noreply.github.com>