Category: learn to code
Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of …
Question: Write a function to compute the number of bits required to convert a integer to another. For example, Input 29 (or 11101), 15 (or 01111) the output is …
Question: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add …
Task: Merge two given sorted integer array A and B into a new sorted integer array. Example A=, B=, return This is the final step of the merge sort …
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted …