Skip to content

Practice Reverse Degree of a String

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#3498
LeetCode Problem

Reverse Degree of a String

Problem Statement

Given a lowercase string s, assign letters their reversed alphabet values: a = 26, b = 25, through z = 1. Multiply each letter’s value by its 1-based position in s, then sum the products. Return this reverse degree.

Source: Reverse Degree of a String on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
s = "abc"
Output
148

# Example 2

Input
s = "zaza"
Output
160

Constraints

1 <= s.length <= 1000
s contains only lowercase English letters.

Related LeetCode Problems

Practice more problems similar to Reverse Degree of a String.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.