We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Loading...
  • Practice
  • Compete
  • Jobs
  • Leaderboard
  1. Practice
  2. Security
  3. Functions
  4. Security Functions II

Security Functions II

  • Problem
  • Submissions
  • Leaderboard
  • Discussions

We now understand the definition of functions.

If , where and then is called an image of , and is called the preimage of .

Given and ,

and

We call the function as (one-to-one) if:

Let us define a particular one-to-one function as , such that

where .

The function defined in the previous challenge is not one-to-one because:

Your task is to complete the function that takes as the input and return .

Constraints

Author

dheeraj

Difficulty

Easy

Max Score

5

Submitted By

24507

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature