GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LeetCode/String/527.Word-Abbreviation at master · wisdompeak/LeetCode

Expand file tree

/

527.Word-Abbreviation

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

527.Word-Abbreviation

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
527.Word-Abbreviation.cpp
527.Word-Abbreviation.cpp
 
 
Readme.md
Readme.md
 
 

Readme.md

527.Word-Abbreviation

设置一个Map和一个Set。Map是从缩写到原单词(数组)的映射。Set盛装所有仍需要进一步求缩写的原单词,初始化的时候则装所有的原单词。

在每次循环中,把Set里所有的单词都求其缩写加入Map,清空Set。然后查看Map的所有元素,对于那些仍然对应多个原单词的缩写,就把这些原单词加入Set。清空Map。

重复这样的循环直至Set不再有元素。

Leetcode Link

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.