[Stage 15] Add Border
Given a rectangular matrix of characters, add a border of asterisks(*) to it.
More …Given a rectangular matrix of characters, add a border of asterisks(*) to it.
More …Several people are standing in a row and need to be divided into two teams. The first person goes into team 1, the second goes into team 2, the third goes into team 1 again, the fourth into team 2, and so on.
More …You have a string s
that consists of English letters, punctuation marks, whitespace characters, and brackets. It is guaranteed that the parentheses in s
form a regular bracket sequence.
Given a string without spaces, a character, and a count, the task is to print the string after the specified character has occurred count number of times.
Print “Empty string” incase of any unsatisfying conditions.
(Given character is not present, or present but less than given count, or given count completes on last index).
If given count is 0, then given character doesn’t matter, just print the whole string.
In a party everyone is in couple except one. People who are in couple have same numbers. Find out the person who is not in couple.
More …Given a number, check whether it is sparse or not. A number is said to be a sparse number if in binary representation of the number no two or more consecutive bits are set.
More …Given a number N, Your task is to find the length of the longest consecutive 1’s in its binary representation.
More …Find the sum of all bits from numbers 1 to N.
More …Given an square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space.
More …구글 번역의 도움을 (많이) 받아 장고 공식 문서를 번역하였습니다.
More …Calculate the factorial for a given number.
More …Given a string of lowercase alphabets and a number k, the task is to print the minimum value of the string after removal of ‘k’ characters. The value of a string is defined as sum of squares of count of each distinct character. For example consider the string “saideep”, here frequencies of characters are s-1, a-1, i-1,e-2, d-1, p-1 and value of the string is 1^2 + 1^2 + 1^2 + 1^2 + 1^1 + 2^2 = 9.
More …Write a program to find the majority element in the array. A majority element in an array A[] of size n is an element that appears more than n/2 times (and hence there is at most one such element). If input array doesn’t contain a majority element, then output “NO Majority Element”
More …Given a sorted array consisting 0’s and 1’s. The task is to find the index of first ‘1’ in the sorted array.
More …