Most people these days want to settle abroad. If I go ask any person working in IT sector about what are the countries they are considering for moving and settling abroad, the obvious answers are either the US or Canada.

Write a program explaining multiple threads working together to solve a problem:

1. Create a int[] DataArray of 100 elements with random numbers. 2. Create 5 threads which take the part of elements from DataArray. 3. Those threads should compute the Square[ ] and Cubes[ ] for those respective values…

Write an algorithm to determine if a number n is "happy".

A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it…

Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither.

IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots (“.”), e.g.,172.16.254.1;