Tip 1: Practice as many questions as you can in DSA.
Tip 2: Keep your theoretical knowledge and concepts clear.
Tip 1: Keep your resume clean and free of any false information.
Tip 2: Ensure that you include your projects on your resume.



Given an array of integers and a target sum, find and count the number of complementary pairs in the array. A complementary pair is defined as a pair of elements whose sum equals the target value.
Write a function count_complementary_pairs(arr, target) that takes an array of integer arr and an integer target as input and returns the count of complementary pairs.
Function Signature:
def count_complementary_pairs(arr: List[int], target: int) -> int:
pass
Constraints:
The input array arr will contain at most 10^5 integers.
Each integer in arr will be in the range [-10^9, 10^9].
The target sum target will be an integer in the range [-10^9, 10^9].
Example:
arr = [1, 2, 3, 4, 5]
target = 6
print(count_complementary_pairs(arr, target)) # Output: 2 (Pairs: (1, 5) and (2, 4))
In a university database system with the following schema:
1. Students:
- Columns: `StudentID`, `FirstName`, `LastName`, `DateOfBirth`, `Gender`, `Email`, `Phone`, `Address`
2. Courses:
- Columns: `CourseID`, `CourseName`, `Department`, `Credits`, `InstructorID`
3. Instructors:
- Columns: `InstructorID`, `FirstName`, `LastName`, `Email`, `Phone`, `OfficeLocation`
4. Enrollments:
- Columns: `EnrollmentID`, `StudentID`, `CourseID`, `Grade`
Write a SQL query to find the average grade of male students (based on their gender) who are enrolled in courses taught by female instructors (based on their gender) within the 'Computer Science' department. Display the instructor's full name, the course name, and the calculated average grade.
Note: Assume appropriate relationships, data types, and constraints in the schema.
Tip 1: Understand the Schema and Relationships.
Tip 2: Break Down the Problem.
Tip 3: Practice SQL Skills.
Write a Java program to calculate and display a person's current age. The program should ask the user to enter their birthdate in the format MM/DD/YYYY. It should then display today's date along with the person's current age in years, months, and days.
1. Prompt the user to input their birthdate in the format MM/DD/YYYY.
2. Read and parse the user input to extract the birthdate components: month, day, and year.
3. Get today's date using the system's current date.
4. Calculate the person's age in years by subtracting the birth year from the current year.
5. Calculate the person's age in months and days by considering the month and day of birth compared to the current month and day.
6. Display today's date and the calculated age in years, months, and days.
1. What is an abstract class in Java? How is it different from an interface?
2. Explain the concept of inheritance in Java. How does it promote code reusability?
3. What is method overloading and method overriding? Provide examples to illustrate the difference.
4. Describe the concept of encapsulation in Java. How does it contribute to data hiding and security?
5. What is polymorphism in Java? How can you achieve polymorphism using method overriding?
6. Explain the importance of the "super" keyword in Java. Provide an example scenario where it is useful.
7. What are access modifiers in Java? List and explain the different types of access modifiers.
8. Describe the concept of interfaces in Java. How do interfaces support multiple inheritances?
9. What is a constructor in Java? Differentiate between a default constructor and a parameterized constructor.
10. How does the concept of static members (variables and methods) work in Java? Provide an example to demonstrate their usage.
1. What is the difference between SQL and NoSQL databases? Provide examples of each type. (Learn)
2. Explain the concept of normalization in database design. Why is it important? (Learn)
3. What are the primary differences between INNER JOIN, LEFT JOIN, and RIGHT JOIN in SQL? Provide examples for each.
4. What is an index in a database? How does it improve query performance? (Learn)
5. Describe the ACID properties in database transactions. Why are they essential for ensuring data integrity and consistency? (Learn)
1. How did you find your interview experience?
2. What motivates you to seek a position at Oracle?
3. Are you open to working in any location?
4. What led you to prefer a consultant role over a development role?
5. What skills do you possess that make you a suitable candidate for this position?

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?