当前位置:网站首页>Leetcode interview question 16.15 Abacus wonderful calculation
Leetcode interview question 16.15 Abacus wonderful calculation
2022-07-02 18:25:00 【I'm not Xiao Haiwa~~~~】

Abas magic calculation game (the game of master mind) Here's how to play .
Computers have 4 Slot , Put a ball in each slot , The color could be red (R)、 yellow (Y)、 green (G) Or blue (B). for example , Computers may have RGGB 4 Kind of ( Slot 1 In red , Slot 2、3 It's green , Slot 4 For blue ). As the user , You try to guess the color combination . For example , You might guess YRGB. If you guess the color of a slot , It's one time “ Guess right ”; If you only guess the right color, but the slot is wrong , It's one time “ A false guess ”. Be careful ,“ Guess right ” Can't count into “ A false guess ”.
Given a color combination solution And a guess guess, Write a method , Returns the number of hits and false guesses answer, among answer[0] For the number of guesses ,answer[1] The number of false guesses .
Example :
Input : solution="RGBY",guess="GGRR"
Output : [1边栏推荐
- 人人工势场法
- RDK simulation experiment
- Explain kubernetes network model in detail
- Pychar modify pep8 e501 line too long > 0 characters
- RTE11- 中断解耦功能
- QQmlApplicationEngine
- [Yugong series] July 2022 go teaching course 001 introduction to go language premise
- C # detect whether the picture is rotated and modified to the true rotation
- Nvidia 显卡 Failed to initialize NVML Driver/library version mismatch 错误解决方案
- 2020 Internet industry terminology
猜你喜欢

微信小程序视频分享平台系统毕业设计毕设(6)开题答辩PPT

Leetcode 面试题 17.01. 不用加号的加法

微信小程序视频分享平台系统毕业设计毕设(4)开题报告

Enter a valid user name and password in the Microsoft LDAP configuration page, and enter a valid user name in the Microsoft LDAP configuration page

Leetcode 面试题 16.17. 连续数列

Wechat applet video sharing platform system graduation design (3) background function

Wechat applet video sharing platform system graduation design completion (6) opening defense ppt

exness深度好文:动性系列-黄金流动性实例分析(五)

能解决80%故障的排查思路

拿起相机,便是最好的艺术疗愈
随机推荐
515. Find the maximum value in each tree row
Win10 uninstall CUDA
2020 Internet industry terminology
Vimium mapping key
Unified interface for reading and writing data files in xml/json/ini and ubjson formats
qt的内存映射
微信小程序视频分享平台系统毕业设计毕设(2)小程序功能
Wechat nucleic acid detection appointment applet system graduation design completion (4) opening report
Wechat applet video sharing platform system graduation design completion (8) graduation design thesis template
Web chat tool
Nvidia 显卡 Failed to initialize NVML Driver/library version mismatch 错误解决方案
1288_FreeRTOS中vTaskResume()接口以及中断安全版本接口实现分析
Unity learning shader notes [82] black and white processing of enhanced single channel color rendering
再放宽!这些应届生,可直接落户上海
Iframe nesting details
Architecture design - ID generator "suggestions collection"
ESP32-C3入门教程 问题篇⑩——error: implicit declaration of function ‘esp_blufi_close‘;
NVIDIA graphics card failed to initialize nvml driver/library version mismatch error solution
RDK simulation experiment
人人工势场法