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
package main | |
import ( | |
"fmt" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/ssm" | |
"strings" | |
) |
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 time | |
from random import randint | |
class FindTheSingleton: | |
# This creates our array, adding each random number twice then appending the non-paired number | |
def generateArray(length, singleton): | |
if length % 2 == 0 : | |
# increase the length to be odd, so we can fit all pairs except the singleton. | |
length = length+1 |
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; | |
namespace WpfApp1 | |
{ | |
public class ArrayOfIntsSolutions | |
{ | |
//This tests the HashSet solution, optimized through the fact that the HashSet will not allow adding of duplicate values. |