LeetCode --- 2103. Rings and Rods 解题报告

Question:

There are n rings and each ring is either red, green, or blue. The rings are distributed across ten rods labeled from 0 to 9.

You are given a string rings of length 2n that describes the n rings that are placed onto the rods. Every two characters in rings forms a color-position pair that is used to describe each ring where:

  • The first character of the ith pair denotes the ith ring's color ('R''G''B').
  • The second character of the ith pair denotes the rod that the ith ring is placed on ('0' to '9').

For example, "R3G2B1" describes n == 3<

相关推荐

  1. LeetCode --- 2103. Rings and Rods 解题报告

    2024-07-10 02:00:03       17 阅读
  2. LeetCode --- 2129. Capitalize the Title 解题报告

    2024-07-10 02:00:03       18 阅读
  3. LeetCode --- 2000. Reverse Prefix of Word 解题报告

    2024-07-10 02:00:03       61 阅读
  4. LeetCode --- 2032. Two Out of Three 解题报告

    2024-07-10 02:00:03       44 阅读
  5. LeetCode --- 2057. Smallest Index With Equal Value 解题报告

    2024-07-10 02:00:03       35 阅读
  6. LeetCode --- 2073. Time Needed to Buy Tickets 解题报告

    2024-07-10 02:00:03       22 阅读
  7. LeetCode --- 2119. A Number After a Double Reversal 解题报告

    2024-07-10 02:00:03       18 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-10 02:00:03       66 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-10 02:00:03       70 阅读
  3. 在Django里面运行非项目文件

    2024-07-10 02:00:03       57 阅读
  4. Python语言-面向对象

    2024-07-10 02:00:03       68 阅读

热门阅读

  1. 重定向(Redirect)和转发(Forward)

    2024-07-10 02:00:03       23 阅读
  2. Git:现代软件开发的基石

    2024-07-10 02:00:03       26 阅读
  3. uni-app-H5页面调用设备摄像头扫描二维码

    2024-07-10 02:00:03       24 阅读
  4. docker

    2024-07-10 02:00:03       19 阅读
  5. 【Oracle】Oracle数据库中的数据类型

    2024-07-10 02:00:03       17 阅读
  6. Qt QChart 图表库详解及使用

    2024-07-10 02:00:03       26 阅读