This file contains hidden or 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; | |
| // this is inspired by question 27 - https://leetcode.com/problems/remove-element/ | |
| // I could not get their c# website runner / compiler to work. I used https://dotnetfiddle.net/ instead. | |
| public class Solution | |
| { | |
| public static int RemoveElement(int[] nums, int val) | |
| { | |
| int k = 0; | |
| for (int i = 0; i < nums.Length; i++) |
This file contains hidden or 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; | |
| // inspired by question 88 on https://leetcode.com/problems/merge-sorted-array | |
| // I couldn't get their c# website compiler / runner to work ;( . I used https://dotnetfiddle.net/ instead to test / run. | |
| public class Solution | |
| { | |
| public int[] Merge(int[] nums1, int m, int[] nums2, int n) | |
| { | |
| int[] merged = new int[n + m]; | |
| int i = 0, j = 0, k = 0; |
This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/smtp" | |
| "os" | |
| "strconv" |
This file contains hidden or 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
| // Note: this is a slightly modified version of an example from - https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed | |
| using System; | |
| using Microsoft.Win32; | |
| namespace GetDotNetVersion | |
| { | |
| public class GetDotNetVersion | |
| { | |
| public static void Main() | |
| { |
This file contains hidden or 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
| // ------------ | |
| // Blink an LED | |
| // ------------ | |
| /*------------- | |
| We've heavily commented this code for you. If you're a pro, feel free to ignore it. | |
| Comments start with two slashes or are blocked off by a slash and a star. | |
| You can read them, but your device can't. |