Coding Fun Java Core Java Programming Challenges #39 | Coding Challenges | by Mr.Srinivas

Core Java Programming Challenges #39 | Coding Challenges | by Mr.Srinivas





Core Java Programming Challenges #39 | Coding Challenges | by Mr.Srinivas

** For Online Training Registration: ► Call: +91-8179191999

💡 Also Watch

C Language Tutorials:
Core Java FAQ’s:
Core Java Tutorials:
Java Programming Tutorials by Mr.Hari krishna:

Advanced Java Programming Tutorials by Mr.Nataraj:

Tags: , , , , , , , , , , , , , , , , ,

3 thoughts on “Core Java Programming Challenges #39 | Coding Challenges | by Mr.Srinivas”

  1. If you have any queries, Please ask our experts and Share your precious feedback in the comments, Learn from experts with our Online training Program, visit our website: https://goo.gl/hNPwDi ,Do not forget to subscribe and hit the bell icon for Future Tutorials updates.

  2. Siva Kumar says:

    I love Your Videos:

    Sorry I dont Know Java But i expressed my algorithm in Swift.

    // This Removes all characters from the String expect letters
    func removeAllSpecialCharacters(in string: String) -> String {
    var localString = string
    var count = 0
    var tempCharacterArray: [Character] = Array.init()
    localString = localString.lowercased()
    for char in localString {
    if !(char >= "a" && char <= "z"){
    count += 1
    } else {
    tempCharacterArray.append(char)
    }

    }
    localString = String.init(tempCharacterArray)
    return localString
    }

    // Spar -> Rasp
    func findAnagramsWith(_ str1: String, _ str2: String) -> Bool {
    var tempStr1 = str1
    var tempStr2 = str2
    tempStr1 = removeAllSpecialCharacters(in: tempStr1)
    tempStr2 = removeAllSpecialCharacters(in: tempStr2)
    var count = 0

    for s1 in tempStr1 {
    for s2 in tempStr2 {
    if s1 == s2 {
    count += 1
    break
    }
    }
    }

    if count == tempStr1.count && count == tempStr2.count {
    return true
    }

    return false
    }

    print(findAnagramsWith("coal", "cola"))

Leave a Reply

Your email address will not be published. Required fields are marked *