Consider again the singly linked list(code provided). Write a method called concatenateLists that takes two linked lists A and B as parameters and returns a single list which consists of (in order) the nodes of A followed by the nodes of B. Your method should be able to handle empty and null lists.
Method signature: public static SLinkedList concatenateLists(SLinkedList A, SLinkedList B)
2. Write a method called printRepeats that takes an integer array of size n. This array will consist solely of integers between 1 and n-1 inclusive. It will print out any integer that repeats. Thus, if your input is {5,1,3,5,4,2}, your method will print out 5. Your method must run in O(n) time (and it is up to you to satisfy yourself that it does so).
Method signature: public static void printRepeats(int[] arr)
HI
Contact me for an efficient, perfect, well documented
development of your project according to 100% accuracy
and requirements, with dedicated support.
Thanks
Farah Saif
Hi, thank you for inviting. I have read the requirements and I would like to do this project. Let me know if you are interested so I can start. Thanks.
Hi there
I'm a senior software developer who have over 170 completed projects and my account was qualified by this site (my page: https://www.freelancer.com/u/DucNA.html).
Btw, could you please send (or discuss with) me more detail? I'll check and then will let you know my estimation (time and coding effort) for this task.
Best regards,
Duc Nguyen
It will be my first work if you agree to work and share with me.
I will do my best for the job. I am skilled Java developer. You will not regret to choose me.
Thank you.
Hello,
I am ready to start working on your project.
Q1: Pseudo Code:
public static SLinkedList concatenateLists(SLinkedList A, SLinkedList B) {
1. If first linked list is empty or null return head of second linkedlist
2. else If second linked list is empty or null return head of first linkedlist
3. else store the address of the starting node of the first linked list in a pointer variable , say p
4. Make p the last node of the linked list through simple linked list traversal technique.
5. Store the address of the first node of the second linked list in the next field of the node pointed by p.
6. Return head1.
Q2: Pseudo code
public static void printRepeats(int[] arr){
1. if arr is null or empty print "Array is null"
2. else we will make create two HashSets : duplicates and notDuplicates
3. start loop over array length
4. if notDuplicate HashSet does not contain array entry. Add this array value to not duplicate HashSet
5. else add array value to duplicate HashSet
6. end loop
7. print duplicate HashSet Values
waiting for your response
Thanks
I already have the code ready for both the questions with proper comments and it's working too. I have tested it. So, I can forward you the code and if you are satisfied with the code, you accept my bid.
I am Oracle Certified Java programmer. I can help you to figure out this problem. As I have experience of working in the industry, I have give 2 days deadline.