`
javatome
  • 浏览: 825254 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Program problem: There is an array: 122333431333312, remove the duplicated number and get 123431312.

 
阅读更多

Program problem: There is an array: 122333431333312, remove the duplicated number and get 123431312.

public string Method(string str)

{

StringBuilder stringBuilder = new StringBuilder(str[0].ToString());

char myChar = str[0];

for (int i = 0; i < str.Length; i++)

{

if (myChar != str[i])

{

myChar = str[i];

stringBuilder.Append(str[i]);

}

}

return stringBuilder.ToString();

}

分享到:
评论

相关推荐

    计算机网络第六版答案

    An important property of such botnets is that the originator of the botnet can remotely control and issue commands to all the nodes in the botnet. Hence, it becomes possible for the attacker to issue...

    com.alibaba.p3c.idea:p3c-common 阿里巴巴

    alibaba p3c 阿里巴巴JAVA P3C eclipse 代码规约插件 离线安装下载 com.alibaba.p3c.idea:p3c-common

    com.alibaba.p3c.idea:p3c-common 代码规范插件

    com.alibaba.p3c.idea:p3c-common 代码规范插件 阿里巴巴插件代码规范

    BURNINTEST--硬件检测工具

    there is a problem in the operating system/ device driver that prevents control being returned to the BurnInTest for that test. This was added for specialized serial port hardware that could ...

    微软内部资料-SQL性能优化5

    If there is no clustered index, there is a sysindexes row for the table with an indid value of 0, and that row will keep track of the address of the first IAM for the table. The IAM is a giant bitmap...

    Duplicate Email Remover 2.7

    Microsoft Outlook Add-In is intended for searching and processing of duplicated messages. Target OS: Windows 95, Windows 98, Windows NT 4.0, Windows 2000, Windows XP, Windows 2003 Server Software ...

    ICS delphixe10源码版

    ICS - Internet Component Suite - V8 - Delphi 7 to RAD Studio 10 Seattle =============================================...the component package and click Remove). Rename the old ICS directory and unzip to...

    TCP IP Illustrated, Vol 1 The Protocols 2nd.pdf

    (This figure is also duplicated on the inside front cover for easy reference while reading the book.) This collection of networks is simple enough that the topology doesn't confuse the examples, and ...

    TreeSize.8.1.2.1575.by [CS].rar (7 April 2021)

    When deleting from the Top 100 list, it could happen that other entries were duplicated. This issue has now been resolved. Scans loaded from an XML file now again show the date of the scan after the ...

    WPTools.v6.29.1.Pro

    here WPREPORTER is activated and the optional WPShared, WPSPell and wPDF can be selected to be compiled into main WPTools package. - also see FAQ: http://www.wpcubed.com/forum/viewforum.php?f=15 - ...

    The.Enigma.Protector.x64.v4.30_DEMO_Modified_Crack

    - Virtual Box: Fixed problem packaging feature is duplicated files are found - Virtual Box: Bug fixed, Command Line options were not read in packages - Virtual Box: Fixed problem with CreateProcess ...

    TeeChart2018ActiveX_0_2_9Eval3264

    This had caused an import problem with the earlier releases of Visual Studio .NET. As a precaution we have chosen to rename the parameter to 'MoreValues' for the TeeChart Pro ActiveX Control. ...

    TeeChart Pro Activex Control v2018

    This had caused an import problem with the earlier releases of Visual Studio .NET. As a precaution we have chosen to rename the parameter to 'MoreValues' for the TeeChart Pro ActiveX Control. ...

    pixelize-1.0.0.tar.gz

    is analyzed, and replaced with an image chosen from a large database of images. Pixelize tries to pick images that best matches each area. To build Pixelize: 1) Edit the Makefile to tell the ...

    Labview去处掉数组重复的元素

    this vi is capble to remove the duplicated elements in the labview array.

    Using Slicing to Identify Duplication in Source Code.pdf

    The novel aspect of our approach is the use of program dependence graphs (PDGs) and program slicing to nd isomorphic PDG subgraphs that represent clones. The key bene ts of this approach are that ...

    B+树_b+tree_

    In this project you are supposed to implement a B+ tree of order 3 with the following operations: initialize insert (with splitting) and search. The B+ tree should be able to print out itself.Input ...

    The.Enigma.Protector.x32.v4.30_DEMO_Modified_Crack

    - Virtual Box: Fixed problem packaging feature is duplicated files are found - Virtual Box: Bug fixed, Command Line options were not read in packages - Virtual Box: Fixed problem with CreateProcess ...

    TeeChart Pro Activex Control v5

    accessible via the TeeChart Program Manager group. =========================================== Changes for this release: ------------------------- Bugs resolved: 1. Print Preview from ...

    Chinese Entity Linking Comprehensive

    matching node for a query, the entity is marked as 'NIL' and then clustered with other NIL entities into equivalence classes. For more information, please refer to the Entity Linking section of NIST's...

Global site tag (gtag.js) - Google Analytics