IT New Question Paper
IT New Question Paper
a) A
B
b) A
c) B
A
d) Error
4. In the context of database systems, which normal form ensures that every non-key
attribute is functionally dependent on the entire primary key and not just a part of it?
a) First Normal Form (1NF)
b) Second Normal Form (2NF)
c) Third Normal Form (3NF)
d) Boyce-Codd Normal Form (BCNF)
8. Write a program in Java to determine if two given strings, s and t, are anagrams of each
other. Return true if they have the same set of characters, and false otherwise.
An anagram is a word or phrase formed by rearranging the letters of another word or phrase,
using all the original letters exactly once.
Example 1:
Input: s = "ready", t = "adyer"
Output: true
Example 2:
Input: s = "bat", t = "bar"
Output: false
9. Write a program in Java to find the subarray with the largest sum, and return its sum. An
array nums is given for you.
Example:
Input: nums = [5,4,-1,7,8]
Output: 23
Explanation: The subarray [5,4,-1,7,8] has the largest sum 23.