This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//visit http://vikash-thiswillgoaway.blogspot.com for solution of other problems | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.FileWriter; | |
import java.io.LineNumberReader; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The problem statement is given below: | |
Your friend John uses a lot of emoticons when you talk to him on Messenger. In addition to being a person who likes to express himself through emoticons, he hates unbalanced parenthesis so much that it makes him go :( | |
Sometimes he puts emoticons within parentheses, and you find it hard to tell if a parenthesis really is a parenthesis or part of an emoticon. | |
A message has balanced parentheses if it consists of one of the following: | |
1. An empty string "" | |
2. One or more of the following characters: 'a' to 'z', ' ' (a space) or ':' (a colon) | |
3. An open parenthesis '(', followed by a message with balanced parentheses, followed by a close parenthesis ')'. | |
4. A message with balanced parentheses followed by another message with balanced parentheses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
/* Logic : Do the following thing until the list is sorted | |
(i) Compare two adjacent elements and check if they are in correct order(that is second one has | |
to be greater than the first). | |
(ii) Swap them if they are not in correct order. | |
*/ | |
void BubbleSort(int *array,int number_of_elements) | |
{ | |
int iter, temp, swapped; | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/** | |
* | |
* @author VIK VIKKU VIKASHVVERMA VIKASH | |
* @since April 8, 2013 | |
* @Website: http://vikash-thiswillgoaway.blogspot.com | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void sumOfSub(int,int,int); | |
static int m=0; | |
int*w; | |
int*x; | |
void main() | |
{ int i=0,sum=0,n=0; | |
printf("Enter size of array: "); | |
scanf("%d",&n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html dir="ltr" lang="en-US"><head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<meta charset="UTF-8"/> | |
<meta content="" name="description"/> | |
<link href="http://www.bitsindri.ac.in/media/com_favicon/icons/1/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" /> | |
<title>BIT Sindri | Home Page</title> | |
<meta name="description" content="Vikku"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @author VIK VIKKU VIKASHVVERMA VIKASH | |
* @since April 8, 2013 | |
* @Website: http://vikash-thiswillgoaway.blogspot.com | |
* | |
*/ | |
public class MergeSort { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @author VIK VIKKU VIKASH VIKASHVVERMA | |
* @website vikash-thiswillgoaway.blogspot.in | |
*/ | |
import java.io.*; | |
public class Level1 | |
{ | |
public static int median(int[] input1,int[] input2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* | |
* @author VIK VIKKU VIKASHVVERMA | |
* @website http://vikash-thiswillgoaway.blogspot.com | |
*/ | |
public class RoadConstruction { | |
public static int minimum_weight(String[] input1, int[] input2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashSet; | |
/** | |
* The program does not use proper approach, It is just a trick to score a reasonable marks on the challenge. | |
* The trick works upto certain extent, don't rely on this and develop the whole program on your own. | |
* | |
* @author VIK VIKKU VIKASH VIKASHVVERMA | |
* @website http://vikash-thiswillgoaway.blogspot.com |
OlderNewer