diff --git a/README.md b/README.md
index a5786015..103b2f14 100644
--- a/README.md
+++ b/README.md
@@ -450,3 +450,4 @@ Profile on LeetCode: [fartem](https://leetcode.com/fartem/).
 | 2520. Count the Digits That Divide a Number                        | [Link](https://leetcode.com/problems/count-the-digits-that-divide-a-number/)                        | [Link](./lib/easy/2520_count_the_digits_that_divide_a_number.rb)                        |
 | 2525. Categorize Box According to Criteria                         | [Link](https://leetcode.com/problems/categorize-box-according-to-criteria/)                         | [Link](./lib/easy/2525_categorize_box_according_to_criteria.rb)                         |
 | 2529. Maximum Count of Positive Integer and Negative Integer       | [Link](https://leetcode.com/problems/maximum-count-of-positive-integer-and-negative-integer/)       | [Link](./lib/easy/2529_maximum_count_of_positive_integer_and_negative_integer.rb)       |
+| 2535. Difference Between Element Sum and Digit Sum of an Array     | [Link](https://leetcode.com/problems/difference-between-element-sum-and-digit-sum-of-an-array/)     | [Link](./lib/easy/2535_difference_between_element_sum_and_digit_sum_of_an_array.rb)     |
diff --git a/leetcode-ruby.gemspec b/leetcode-ruby.gemspec
index 0707ac72..530c37bd 100644
--- a/leetcode-ruby.gemspec
+++ b/leetcode-ruby.gemspec
@@ -5,7 +5,7 @@ require 'English'
 ::Gem::Specification.new do |s|
   s.required_ruby_version = '>= 3.0'
   s.name = 'leetcode-ruby'
-  s.version = '5.8.9'
+  s.version = '5.9.0'
   s.license = 'MIT'
   s.files = ::Dir['lib/**/*.rb'] + %w[bin/leetcode-ruby README.md LICENSE]
   s.executable = 'leetcode-ruby'
diff --git a/lib/easy/2535_difference_between_element_sum_and_digit_sum_of_an_array.rb b/lib/easy/2535_difference_between_element_sum_and_digit_sum_of_an_array.rb
new file mode 100644
index 00000000..c7706f76
--- /dev/null
+++ b/lib/easy/2535_difference_between_element_sum_and_digit_sum_of_an_array.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+# https://leetcode.com/problems/difference-between-element-sum-and-digit-sum-of-an-array/
+# @param {Integer[]} nums
+# @return {Integer}
+def difference_of_sum(nums)
+  sum_of_nums = 0
+  sum_of_digits = 0
+  nums.each do |num|
+    sum_of_nums += num
+    n = num
+
+    while n.positive?
+      sum_of_digits += n % 10
+      n /= 10
+    end
+  end
+
+  (sum_of_nums - sum_of_digits).abs
+end
diff --git a/test/easy/test_2535_difference_between_element_sum_and_digit_sum_of_an_array.rb b/test/easy/test_2535_difference_between_element_sum_and_digit_sum_of_an_array.rb
new file mode 100644
index 00000000..36927179
--- /dev/null
+++ b/test/easy/test_2535_difference_between_element_sum_and_digit_sum_of_an_array.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require_relative '../test_helper'
+require_relative '../../lib/easy/2535_difference_between_element_sum_and_digit_sum_of_an_array'
+require 'minitest/autorun'
+
+class DifferenceBetweenElementSumAndDigitSumOfAnArrayTest < ::Minitest::Test
+  def test_default
+    assert_equal(9, difference_of_sum([1, 15, 6, 3]))
+    assert_equal(0, difference_of_sum([1, 2, 3, 4]))
+  end
+end