Leetcode 1290 solution in java

Convert Binary Number in a Linked List to Integer Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of a number. Return the decimal value of the number in the linked list. The problem is…

leetcode solution of problem 1409

Queries on a Permutation With Key Given the array queries of positive integers between 1 and m, you have to process all queries[i] (from i=0 to i=queries.length-1) according to the following rules: In the beginning, you have the permutation P=[1,2,3,…,m]. For the current i, find the position of queries[i] in the permutation P (indexing from…