Yahoo India Web Search

Search results

  1. Jun 20, 2024 · This repository is mostly Java & PHP solutions of HackerRank Algorithms & Data Structures' Questions. However, there are some C# & Python solutions. It is one of the biggest public repository for Algorithms & Data Structures.

  2. Jun 14, 2024 · string strings_xor(string s, string t) { string res = ""; for(int i = 0; i < s.size(); i++) { if(((int)s[i] - '0' + t[i] - '0') % 2 == 0) res += '0'; else res += '1'; } return res; } Find the XOR of two strings.

  3. Jun 15, 2024 · You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window.

  4. Jun 19, 2024 · XOR of a number with itself is 0, and XOR of a number with 0 is the number itself. Using these properties, XOR all numbers in the range [1, N] and XOR all elements of the array. The result will be the missing number.

    • 6 min
  5. Jun 24, 2024 · The task is to maximize the profit by selling at-most 'M' products. Examples: Input: N = 5, M = 3 CP[]= {5, 10, 35, 7, 23} SP[] = {11, 10, 0, 9, 19} Output: 8 Profit on 0th product i.e. 11-5 = 6 Profit on 3rd product i.e. 9-7 = 2 Selling any other produc

  6. Jun 20, 2024 · 55 minutes ago. N=input ('n:').split () function=0. for i in range (int (N [0])): print ('.............',int (N [0])) n=input ('e:').split () elements=list (map (int,n)) print (max (elements)) function=function+max (elements)**2 print (function) print (function%int (N [1])) 0 |. Permalink.

  7. Jun 14, 2024 · Given an array that contains both positive and negative integers, the task is to find the product of the maximum product subarray. Examples: Input: arr [] = {6, -3, -10, 0, 2} Output: 180. Explanation: The subarray is {6, -3, -10} Input: arr [] = {-1, -3, -10, 0, 60}

  1. People also search for