India’s Best Job Seekers and Training Platform Forums Java Problems set Given two words, determine if the first word…

  • Given two words, determine if the first word…

  • Akash 

    Administrator
    at

    Given two words, determine if the first word, or any anagram of it, appears in consecutive characters of the second word. For instance, tea appears as an anagram in the last three letters of slate, but let does not appear as an anagram in actor even though all the letters of let appear in slate.
    Return the anagram of the first word that has appeared in the second word.
    Sample Input 1
    tea
    slate
    Sample Output1
    ate
    Sample Input 2
    let
    slate
    Sample Output2
    NONE

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close