Monthly Archives: June 2010

Die Game

Life is not easy. Sometimes it is beyond your control. Now, as contestants of ACM ICPC, you might be just tasting the bitter of life. But don’t worry! Do not look only on the dark side of life, but look … Continue reading

Posted in Information Technology | Leave a comment

Unidirectional TSP

Background Problems that require minimum paths through some domain appear in many different areas of computer science. For example, one of the constraints in VLSI routing problems is minimizing wire length. The Traveling Salesperson Problem (TSP) — finding whether all … Continue reading

Posted in Information Technology | Leave a comment

Cutting Sticks

You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money according to the length of the stick being cut. Their procedure of work requires that they only make one … Continue reading

Posted in Information Technology | Leave a comment

Sorting Targets for Execution

Sample MSBuild target dependencies <target Name=”ReBuild” DependsUponTargets=”Clean;Build”/> <target Name=”Build” DependsUponTargets=”BeforeBuild;CoreBuild;AfterBuild”/> <target Name=”CoreBuild” DependsUponTargets=”Compile”/> <target Name=”Compile” DependsUponTargets=””/> <target Name=”BeforeBuild” DependsUponTargets=””/> <target Name=”AfterBuild” DependsUponTargets=””/> <target Name=”Clean” DependsUponTargets=””/>   using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text;   namespace ConsoleApplication1 { … Continue reading

Posted in Information Technology | Leave a comment

Equation Through InOrder Traversal

using System; using System.Collections.Generic; using System.Collections;   namespace ConsoleApplication1 {     public class Node     {         private Node left;         private Node right;         private string value;         public Node(Node left, Node right, string value)         {             this.left … Continue reading

Posted in Information Technology | Leave a comment

Clock question

  using System; using System.Collections.Generic; using System.Text; using System.Collections;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             Console.WriteLine(GetAngleInDegrees(7, 00));         }         public static double GetAngleInDegrees(double hours, double minutes)         { … Continue reading

Posted in Information Technology | Leave a comment

Reversing the sequence of words in a string with minimal temporary storage

using System; using System.Collections.Generic; using System.Text; using System.Collections;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             string str = "I like computers";             char[] chArray = str.ToCharArray();             //reversing the entire … Continue reading

Posted in Information Technology | Leave a comment