Skip to content

Commit

Permalink
String to string for conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
mina-asham committed May 10, 2015
1 parent d7515e3 commit e579951
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions algs4/algs4/GaussianElimination.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public static double[] LSolve(double[][] a, double[] b)
/// Sample client
/// </summary>
/// <param name="args"></param>
public static void RunMain(String[] args)
public static void RunMain(string[] args)
{
int N = 3;
const int n = 3;
double[][] a =
{
new[] { 0.0, 1.0, 1.0 },
Expand All @@ -79,7 +79,7 @@ public static void RunMain(String[] args)
double[] x = LSolve(a, b);

// print results
for (int i = 0; i < N; i++)
for (int i = 0; i < n; i++)
{
StdOut.PrintLn(x[i]);
}
Expand Down
12 changes: 6 additions & 6 deletions algs4/algs4/LZW.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class LZW

public static void Compress()
{
String input = BinaryStdIn.ReadString();
string input = BinaryStdIn.ReadString();
TST<int> st = new TST<int>();
for (int i = 0; i < R; i++)
{
Expand All @@ -27,7 +27,7 @@ public static void Compress()

while (input.Length > 0)
{
String s = st.LongestPrefixOf(input); // Find max prefix match s.
string s = st.LongestPrefixOf(input); // Find max prefix match s.
BinaryStdOut.Write(st.Get(s)); // Print s's encoding.
int t = s.Length;
if (t < input.Length && code < L) // Add s to symbol table.
Expand All @@ -42,7 +42,7 @@ public static void Compress()

public static void Expand()
{
String[] st = new String[L];
string[] st = new string[L];
int i; // next available codeword value

// initialize symbol table with all 1-character strings
Expand All @@ -57,7 +57,7 @@ public static void Expand()
{
return; // expanded message is empty string
}
String val = st[codeword];
string val = st[codeword];

while (true)
{
Expand All @@ -67,7 +67,7 @@ public static void Expand()
{
break;
}
String s = st[codeword];
string s = st[codeword];
if (i == codeword)
{
s = val + val[0]; // special case hack
Expand All @@ -81,7 +81,7 @@ public static void Expand()
BinaryStdOut.Close();
}

public static void RunMain(String[] args)
public static void RunMain(string[] args)
{
if (args[0] == "-")
{
Expand Down

0 comments on commit e579951

Please sign in to comment.