var node = new DoublyLinkedListNode(); node.data = data; if (head == null) { return node; }...
Given a sorted array and a target value, return the index if the target is found. If...
Write an algorithm to determine if a number is “happy”. A happy number is a number defined...
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do...
Merge two sorted linked lists and return it as a new list. The new list should be...
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string...
Implement pow(x, n), which calculates x raised to the power n (xn).Power n (xn)으로 x를 계산하는 pow (x, n)을 구현합니다. /** * @param...
Write a function to find the longest common prefix string amongst an array of strings.If there is...
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L...
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same...