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.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Databases
  3. Set and Algebra
  4. Databases - Differences

Databases - Differences

Problem
Submissions
Leaderboard
Discussions
  1. Prepare
  2. Databases
  3. Set and Algebra
  4. Databases - Differences
Exit Full Screen View
  • Problem
  • Submissions
  • Leaderboard
  • Discussions

Relation R(A,B,C) has the following tuples:

A B C
1 2 3
4 2 3
4 5 6
2 5 3
1 2 6

and relation S(A,B,C) has the following tuples:

A B C
2 5 3
2 5 4
4 5 6
1 2 3

The differences (R-S) is computed and the following tuple is found to be present in the result. Assume that the schema of the result is (A,B,C).

4, b, c

Find the integers b and c. Fill in the values in the answer box, each on a new line.

Output Format

Two integers, corresponding to b and c, each on a new line. For example:

4  
5  
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy