Polar Coordinates Python

Problem Statement :

```Task:
You are given a complex z. Your task is to convert it to polar coordinates.

Input Format:

A single line containing the complex number z. Note: complex() function can be used in python to convert the input as a complex number.

Constraints:

Given number is a valid complex number

Output Format

Output two lines:
The first line should contain the value of r.
The second line should contain the value of y.```

Solution :

```                            ```Solution in C :

import cmath
a=complex(input())
print(abs(a))
print(cmath.phase(a))```
```

Cycle Detection

A linked list is said to contain a cycle if any node is visited more than once while traversing the list. Given a pointer to the head of a linked list, determine if it contains a cycle. If it does, return 1. Otherwise, return 0. Example head refers 1 -> 2 -> 3 -> NUL The numbers shown are the node numbers, not their data values. There is no cycle in this list so return 0. head refer

Find Merge Point of Two Lists

This challenge is part of a tutorial track by MyCodeSchool Given pointers to the head nodes of 2 linked lists that merge together at some point, find the node where the two lists merge. The merge point is where both lists point to the same node, i.e. they reference the same memory location. It is guaranteed that the two head nodes will be different, and neither will be NULL. If the lists share

Inserting a Node Into a Sorted Doubly Linked List

Given a reference to the head of a doubly-linked list and an integer ,data , create a new DoublyLinkedListNode object having data value data and insert it at the proper location to maintain the sort. Example head refers to the list 1 <-> 2 <-> 4 - > NULL. data = 3 Return a reference to the new list: 1 <-> 2 <-> 4 - > NULL , Function Description Complete the sortedInsert function