PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 157
Good morning! Here's your coding interview problem for today.

This problem was asked by Amazon.

Given a string, determine whether any permutation of it is a palindrome.

For example, `carrace` should return `true`, since it can be rearranged to form racecar, which is a palindrome. `daily` should return `false`, since there's no rearrangement that can form a palindrome.

Pull request:
Day157
Resolves #327.

Patch:
diff --git a/README.md b/README.md
index b544125..3cbba53 100644
--- a/README.md
+++ b/README.md
@@ -167,3 +167,4 @@ problems from
 * [Day 154](https://github.com/vaskoz/dailycodingproblem-go/issues/320)
 * [Day 155](https://github.com/vaskoz/dailycodingproblem-go/issues/322)
 * [Day 156](https://github.com/vaskoz/dailycodingproblem-go/issues/325)
+* [Day 157](https://github.com/vaskoz/dailycodingproblem-go/issues/327)
diff --git a/day157/problem.go b/day157/problem.go
new file mode 100644
index 0000000..0112fe1
--- /dev/null
+++ b/day157/problem.go
@@ -0,0 +1,18 @@
+package day157
+
+// IsPermutationPalindrome answers if the given string
+// can be permutated into a palindrome.
+// Runs in O(N) time and O(N) space.
+func IsPermutationPalindrome(s string) bool {
+	runeCount := make(map[rune]int)
+	for _, r := range s {
+		runeCount[r]++
+	}
+	var odds int
+	for _, v := range runeCount {
+		if v%2 == 1 {
+			odds++
+		}
+	}
+	return odds < 2
+}


Test patch:
diff --git a/day157/problem_test.go b/day157/problem_test.go
new file mode 100644
index 0000000..8671221
--- /dev/null
+++ b/day157/problem_test.go
@@ -0,0 +1,28 @@
+package day157
+
+import "testing"
+
+var testcases = []struct {
+	s        string
+	expected bool
+}{
+	{"carrace", true},
+	{"daily", false},
+}
+
+func TestIsPermutationPalindrome(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := IsPermutationPalindrome(tc.s); result != tc.expected {
+			t.Errorf("For %v got %v got %v", tc.s, result, tc.expected)
+		}
+	}
+}
+
+func BenchmarkIsPermutationPalindrome(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			IsPermutationPalindrome(tc.s)
+		}
+	}
+}
Repository: cinar/indicatorts (ts)

Issue:
onBalanceVolume returns only nan
onBalanceVolume returns always NAN

The fix should be pretty simple once the "i" is compared to 0 but "i" is never 0


```
 for (let i = 1; i < result.length; i++) {
    if (i === 0) {
      result[i] = 0;
    } 
    ...
```
to 
    
```
 for (let i = 1; i < result.length; i++) {
    if (i === 1) {
      result[i] = 0;
    } 
    ...
```




Pull request:
Fix On Balance Volume (OBV) calculation.
# Describe Request

Fix On Balance Volume (OBV)  calculation.

Fixed #426 

# Change Type

Bug Fix


Patch:
diff --git a/src/indicator/volume/onBalanceVolume.ts b/src/indicator/volume/onBalanceVolume.ts
index fa18a5e..684ac72 100644
--- a/src/indicator/volume/onBalanceVolume.ts
+++ b/src/indicator/volume/onBalanceVolume.ts
@@ -23,17 +23,15 @@ export function onBalanceVolume(
 
   const result = new Array<number>(closings.length);
 
+  result[0] = 0;
+
   for (let i = 1; i < result.length; i++) {
-    if (i === 0) {
-      result[i] = 0;
-    } else {
-      result[i] = result[i - 1];
+    result[i] = result[i - 1];
 
-      if (closings[i] > closings[i - 1]) {
-        result[i] += volumes[i];
-      } else if (closings[i] < closings[i - 1]) {
-        result[i] -= volumes[i];
-      }
+    if (closings[i] > closings[i - 1]) {
+      result[i] += volumes[i];
+    } else if (closings[i] < closings[i - 1]) {
+      result[i] -= volumes[i];
     }
   }
 


Test patch:
diff --git a/src/indicator/volume/onBalanceVolume.test.ts b/src/indicator/volume/onBalanceVolume.test.ts
new file mode 100644
index 0000000..0351bc8
--- /dev/null
+++ b/src/indicator/volume/onBalanceVolume.test.ts
@@ -0,0 +1,16 @@
+// Copyright (c) 2022 Onur Cinar. All Rights Reserved.
+// https://github.com/cinar/indicatorts
+
+import { roundDigitsAll } from '../../index';
+import { onBalanceVolume } from './onBalanceVolume';
+
+describe('On Balance Volume (OBV)', () => {
+  it('should be able to compute OBV', () => {
+    const closings = [9, 11, 7, 10, 8];
+    const volumes = [100, 110, 80, 120, 90];
+    const expected = [0, 110, 30, 150, 60];
+
+    const actual = onBalanceVolume(closings, volumes);
+    expect(roundDigitsAll(2, actual)).toStrictEqual(expected);
+  });
+});