Monthly Archives: April 2010

Figuring out team groups based on match fixtures

using System; using System.Collections.Generic; using System.Collections; using System.Text; using System.Text.RegularExpressions; using System.IO;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             StreamReader sr = new StreamReader(@"C:\Fixture.txt");             string str = sr.ReadLine();             … Continue reading

Posted in Information Technology | Leave a comment

Determine if two rectangles overlap each other

using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; using System.IO;   namespace ConsoleApplication1 {     public class Rectangle     {         public int topLeftx, topLefty, bottomRightx, bottomRighty;         public Rectangle(int topLeftx, int topLefty, int bottomRightx, int bottomRighty)         {             … Continue reading

Posted in Information Technology | Leave a comment

Print the most repeated word in a book using hash table

using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text; using System.Text.RegularExpressions;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             string book = "one two two three three three four four … Continue reading

Posted in Information Technology | Leave a comment

White king got confined

Posted in Games | Leave a comment

Print the most repeated word in a book

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             string book = "abc def abc def abc";             Regex reg = new … Continue reading

Posted in Information Technology | Leave a comment

Segregate 0s and 1s in an array

using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             int[] intArray = { 0, 1, 0, 1, 0, 0, 1, 1, 1, … Continue reading

Posted in Information Technology | Leave a comment

Find two numbers in an array whose sum equals a given value

using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; using System.IO;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             int[] intArray = { 1, 2, 3, 4, 5, 6 };             Console.WriteLine(Check(intArray, … Continue reading

Posted in Information Technology | Leave a comment