Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
check with hashset
'Title of this code 'Rextester.Program.Main is the entry point for your code. Don't change it. 'Compiler version 11.0.50709.17929 for Microsoft (R) .NET Framework 4.5 Imports System Imports System.Collections.Generic Imports System.Linq Imports System.Text.RegularExpressions Namespace Rextester Public Module Program function check(a as string, b as string) dim b_uniq as HashSet(Of Char) = new HashSet(Of char)(b) For Each c as char in a if not b_uniq.Contains(c) then return False next return True end function Public Sub Main(args() As string) Console.WriteLine(check("urok", "kkkonkurs")) Console.WriteLine(check("konkurs", "surokn")) End Sub End Module End Namespace
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Extract values from square brackets
CAI Visual Basic - Ej Elecciones
CAI Visual Basic - Ej Citas
Selected Shakespeare Sonnet for doy mod 150
Hello
Reed Solomon error correction (success)
CAI Visual Basic - Ej Recetas
ABS Cracker
CAI Visual Basic - Libreria Funciones
Rounding behaviours
Please log in to post a comment.