淘客熙熙

主题:求教大家一个算法问题 -- looklook

共:💬24 🌺10 新:
全看分页树展 · 主题 跟帖
家园 Variation of the classic issue.

There are lots of variation of the classic issue.

One variation is: there is a character sequence composed of 26 English alphabets: a-z, assuming all lower case. How to find the duplicate character in the sequence if there is any?

The solution is to use an array of 26 to hold a-z. If there is an array element being written twice, then that\'s the duplicate.

As a matter of fact, this is one of the questions in a Microsoft interview.

bigbug

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河