0
Then with the sequence sorted and ordered crescently need to exclude all characters that come after (and including) the symbol "_" (without quotation marks).
Could you help me where I should start ?
0
Then with the sequence sorted and ordered crescently need to exclude all characters that come after (and including) the symbol "_" (without quotation marks).
Could you help me where I should start ?
3
With Linq is a short code:
var allChars = "abcdefghijklmnopqrstuvwxyz_0123456789";
var bigString = "u2wlcn7cj0ej0u2d14kmylhm311mpj0f44k7m9hvz j0xep9vgbbox4kn4kf4o8g5h4kvzxr4kmha898gha 8hpnnzh_8gzhe0l4kapd_nxu2rbj05gq7b3cct2qg 11g4ks9drzgt2xvhi6qvf4vi65nu2qzgohvi6lw9y xpu2qj0llu2e05cpx91cba7pt2noxbglp4khsvvwd 3gami6nprrha8_u2mwd7e0p5nngt2xg4kqx8_f4lr 3kbnn7z5zcv3nh8_salov9rpuumr3m1ai6zj0e0dv 7vht2bdj0e0lf4rb95knpqi6nxqi6ozzpdrv8_bw5 b6l7umj0c8_oqt2c9grmxkwk3755czhhqwuqzo1zn qgf4m7b6dxrxi6g9vkb6ypb65yb6anuccpse0zgv_ dvt2yb69b6r5b6rb63ldb6pi6y9hgzkpt2loxf4k7 t2rzk91j0mdhppuca35ohf4ne0hdnlnhe0xwj0_yh ulslwpdrgj0sy_f44kqcd94kb6ywhqxp3j0vv_qbs 7c4knxre0w_i6vgvpol435mqf44ky5xoxzuyqct2r iyxcncwvvqhd9u2p34k7ggu2e08_zbcre0xbt24kc sbnj0czqoq_wr4kt2pscl47zrme0y5bxpzryl4f4y dknd_zbj0j0qcnu29bpj0ba7e0cu23xbprj0j0j0c ybvcgh5f4bcv5njic0pl47iwzkqvw_hl4oy5nyjrm iqvu2bsybe0t2kl4nsgv9wqt2rf4crirs3y7wdvb0 p1wn555h0t2ju2g_ngl4xam6sy7bko0p_gnk5dvgz 0p_cm6yxcl4rt2jt2h0niu2szzbnkkn_h03_e7nb1 ou2xv50pu25o9t2cjbex_vpqb8wyjgczobc5irm6g f4v8wnl4rxaryl44t2dl44z8wg7cp__i8wu2_vk2_ kzkm65k1l4l4o75eix9r3xym6lvyvt2lf4y5yd8wt 2zxugr5hx8wqgm6m6s8v9tshrubly7pevlpg1lllu m5bscjuv_cbtf4jpnr3ervyx1tbr6xa5qsq_2_bo6 iiub5qmg8wtvz6x9ln6x6xys8kb8w1qu5zt7epk2_ ugguk1ayhr39icrdp5cnrhmlucqzb19vo6js8e76x vbzrccyqju9ufbi2_s8io6vpb1hhqz5k7cmm2_8wt zi2_d2_em1t93k6x5p7kpqftqjrhiiuvyijt8wrmj 2_r2_nls84aqemp2_yph0_mu5r7lm84w184wibz6x nrld_fracudo66x184w5s843q5m9jkdvbfbnmk9vk tr1k7yyct_84wymz6xswtd_dvsjviugj1jvs71wl9 ltkfr1lv6xkzb5qkzr3jvvu5uz91kpcvvrc_o6e79 ryyua1s5ilqpwr0zkyrsbskjny77wid1kcfj9k984 wqu84tri9h0usq84tq_b3jysid84wv9p1mh0o60z9 6xc1sacpe4h0ceplbi4h0gnuaucvatjprbffl10zf yyr9ndr6x5q__1pt6xkcb4h04h03slnu5u184wljw 84xb9xzb329u5jntz84teb1rknnff4h0l_cvxo6w8 4d8tpxldvso6n4h0nfx1x29nmw83o6pu_8tg129o6 s7o6f4h04h3j4hm29xk7dn1vo6r2w829lsxy_cles bno6nd1r2gxf_bzipudfo6n8t4hlclvn4hu1w87mr 229bjkr2yo6aw8oz_8ttftltix4h54h7d_q0otq0m ye294hlulp29ffq0mug4hpxxsyevnci4nymjs34n4 ndir2f29g_jjcltmgp4hlp129udr27jviixlx2934 npw8vr2bq0y1gvu4h29osk4htv_pq04nyzmjymr2p 4np74hebxq01fpm3kfhzir2ot31xyvclcr2_zc3r2 8tsakfu1sy777yujzdjgiz34ngmo4n13ogw8k4njc 4ndlpvk8tg4n8tg291ajm5zw8c2954nkh3ggmhz29 ijyr2p3bkpdcr25iby8tey1q03chl29ldzee7lebq 01jplphcdgptdelzkhxpxq03clexvlc65jiys31sg s7gmsa1dd293cl65gm7se_e65ubvms1cpjw8scw82 9e1365gq0dxvv65h_zut3ea65uydayapfamxilyug ubce_kibq0u3ets71vlm29g7uecr2m_uo29jvkj29 ammy1e291v3gxw8fcfq0_fj94na65uaja3hsjvtsd uzpmq0ecx9fuq0aaq0q0h9tvl_u9u7r2q0aq0uu3y gy1pqx4n76hr265n9376hhi1w8r2ufn76tl9unfqw 8ay9dim76a3ahiihvcaycini9doqzm76r23nxn65n x65squw1cuzr2r2kscjv_76jw31sp_xfkupx1_r2c bzovpsbwyi365ume653aanyiaqr2o9momq76ldf1p r2ejqnytjftckly1kz33sdupl76makofxnac9jbbf tywdx13mvm3fvwogp55ggfeivpfiq5qlzcw55ee76 lzclxkgq0lv5ysu3ig9nft15xq0376ooo3fg5vnop v9tjy_udsf_w1x_wloy1zn8f5ixdeyxbvq0lj5unc 8fmtvjh76rr1rpcxo3wgg76llwcmz1lp_bg3w3p3e p76dntx76zjbq0prgtpd1bto8fhwknq0da5rbq0vr y8faiq0_lne76q05wlwpjp38fxbm76t5tiphu1z9p uhwghga8fyb3htul7wk5gpo7avwbti6xuv1q0rokn oas_5pvu8fq08fanwd3vzra75q0pxu1dopi68fa_s _xi6a8e8f_a8bea8wg1a8a87morlogp3mm5a8v7rw 1bt_bzthsnza8xz5i6tbyuohtqswn5qek7uj0roj0 1er8f38f4e5nhkna_nyi6oes8g1ae5o7puoyoyb3u 7w5euswza8ra8a8nyz7ka8xuncumlsnzo1a83vkmj 07oej0y8go31h8gtrqtdo5u3i6ubi68gj0hrut2k5";
var result = allChars.Select(c => new { character = c, times = bigString.Count(c2 => c2 == c) })
.OrderBy(c => c.times)
.TakeWhile(c => c.character != '_');
foreach (var item in result)
{
Console.WriteLine($"caractere: {item.character} vezes: {item.times}");
}
Browser other questions tagged c# asp.net-mvc-5 asp.net-core
You are not signed in. Login or sign up in order to post.