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
public static string[,] LoadCsv(string filename) | |
{ | |
//get the file text | |
string text = System.IO.File.ReadAllText(filename); | |
//split into Lines | |
text = text.Replace("\n", "\r"); | |
string[] lines = text.Split(new char[] { '\r' }, StringSplitOptions.RemoveEmptyEntries); | |
// to get how many rows and columns |
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
Name: Flash | |
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc= | |
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676 | |
Thank you! |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
class Solution { | |
static void Main(String[] args) | |
{ | |
int N = Convert.ToInt32(Console.ReadLine()); | |
string[] arr_temp = Console.ReadLine().Split(' '); | |
int[] list1 = Array.ConvertAll(arr_temp,Int32.Parse); | |
Solution.quickSortInPlace(list1); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Algorithms | |
{ | |
class InsertionSort2 | |
{ |
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
public static void WordCount(string word, string path) | |
{ | |
int index; | |
int occurrence = 0; | |
try | |
{ | |
StreamReader reader = new StreamReader(path); | |
using(reader) |
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.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution | |
{ | |
public static void main(String[] args) |
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; | |
public class Binary | |
{ | |
public static String convertToBinary(int decnumber) | |
{ | |
String binaryString = " "; | |
if (decnumber > 0) | |
{ | |
binaryString = Integer.toBinaryString(decnumber); |
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.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
public static int factorial(int n)//factorial method | |
{ | |
if (n == 0) |
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
//Day8 | |
import java.util.*; | |
import java.io.*; | |
class Solution{ | |
public static void main(String []argh) | |
{ | |
Map<String,Long> phonebook = new java.util.HashMap<>(); | |
Scanner in = new Scanner(System.in); | |
int n = in.nextInt(); |
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; | |
public class Day6{ | |
public static void main(String[] args){ | |
Scanner input = new Scanner(System.in); | |
int n = input.nextInt(); | |
input.nextLine(); | |
String[] words = new String[n]; |
NewerOlder