Skip to content

Instantly share code, notes, and snippets.

@bolorundurowb
Last active February 7, 2018 11:28
Show Gist options
  • Save bolorundurowb/edf0214587b37b6dd54926532829418c to your computer and use it in GitHub Desktop.
Save bolorundurowb/edf0214587b37b6dd54926532829418c to your computer and use it in GitHub Desktop.
A set of algorithms implemented in C#
private static List<string> GetList()
{
List<string> colors = new List<string>
{
"ab",
"abaci",
"aback",
"abacus",
"abacuses",
"abaft",
"abalone",
"abalones",
"abandon",
"abandoned",
"abandonedly",
"abandonee",
"abandoner",
"abandoners",
"abandoning",
"abandonment",
"abandonments",
"abandons",
"abase",
"abased",
"abasedly",
"abasement",
"abaser",
"abasers",
"abases",
"abash",
"abashed",
"abashedly",
"abashes",
"abashing",
"abashment",
"abashments",
"abasing",
"abatable",
"abate",
"abated",
"abatement",
"abatements",
"abater",
"abaters",
"abates",
"abating",
"abatis",
"abatises",
"abator",
"abattoir",
"abattoirs",
"abbacies",
"abbacy",
"abbatial",
"abbe",
"abbes",
"abbess",
"abbesses",
"abbey",
"abbeys",
"abbot",
"abbotcies",
"abbotcy",
"abbots",
"abbotship",
"abbotships",
"abbott",
"abbr",
"abbrev",
"abbreviate",
"abbreviated",
"abbreviates",
"abbreviating",
"abbreviation",
"abbreviations",
"abbreviator",
"abbreviators",
"abc",
"abdicable",
"abdicate",
"abdicated",
"abdicates",
"abdicating",
"abdication",
"abdications",
"abdicator",
"abdomen",
"abdomens",
"abdominal",
"abdominally",
"abduct",
"abducted",
"abducting",
"abduction",
"abductions",
"abductor",
"abductors",
"abducts",
"abeam",
"abecedarian",
"abecedarians",
"abed",
"aberdeen",
"aberrance",
"aberrancies",
"aberrancy",
"aberrant",
"aberrantly",
"aberrants",
"aberration",
"aberrational",
"aberrations",
"abet",
"abetment",
"abets",
"abettal",
"abettals",
"abetted",
"abetter",
"abetters",
"abetting",
"abettor",
"abettors",
"abeyance",
"abeyances",
"abeyancies",
"abeyancy",
"abeyant",
"abhor",
"abhorred",
"abhorrence",
"abhorrences",
"abhorrent",
"abhorrently",
"abhorrer",
"abhorrers",
"abhorring",
"abhors",
"abidance",
"abide",
"abided",
"abider",
"abiders",
"abides",
"abiding",
"abidingly",
"abidingness",
"abigail",
"abilene",
"abilities",
"ability",
"abiotic",
"abject",
"abjection",
"abjectly",
"abjectness",
"abjuration",
"abjurations",
"abjuratory",
"abjure",
"abjured",
"abjurer",
"abjurers",
"abjures",
"abjuring",
"ablate",
"ablated",
"ablates",
"ablating",
"ablation",
"ablations",
"ablatival",
"ablative",
"ablatively",
"ablatives",
"ablaze",
"able",
"ableness",
"abler",
"ables",
"ablest",
"ablings",
"abloom",
"ablush",
"abluted",
"ablution",
"ablutionary",
"ablutions",
"ably",
"abnegate",
"abnegated",
"abnegates",
"abnegating",
"abnegation",
"abnegations",
"abnegator",
"abnegators",
"abner",
"abnormal",
"abnormalities",
"abnormality",
"abnormally",
"abnormals",
"abo",
"aboard",
"abode",
"aboded",
"abodes",
"aboding",
"aboil",
"abolish",
"abolishable",
"abolished",
"abolisher",
"abolishers",
"abolishes",
"abolishing",
"abolishment",
"abolition",
"abolitionary",
"abolitionism",
"abolitionist",
"abolitionists",
"abominable",
"abominably",
"abominate",
"abominated",
"abominates",
"abominating",
"abomination",
"abominations",
"abominator",
"abominators",
"aboral",
"aboriginal",
"aboriginally",
"aborigine",
"aborigines",
"aborning",
"abort",
"aborted",
"aborter",
"aborters",
"abortifacient",
"aborting",
"abortion",
"abortional",
"abortionist",
"abortionists",
"abortions",
"abortive",
"abortively",
"abortiveness",
"abortogenic",
"aborts",
"abound",
"abounded",
"abounding",
"abounds",
"about",
"above",
"aboveboard",
"aboveground",
"aboves",
"abracadabra",
"abradant",
"abradants",
"abrade",
"abraded",
"abrader",
"abraders",
"abrades",
"abrading",
"abraham",
"abrasion",
"abrasions",
"abrasive",
"abrasively",
"abrasiveness",
"abrasives",
"abreact",
"abreacted",
"abreacting",
"abreaction",
"abreacts",
"abreast",
"abridge",
"abridged",
"abridgement",
"abridgements",
"abridger",
"abridgers",
"abridges",
"abridging",
"abridgment",
"abridgments",
"abroad",
"abrogate",
"abrogated",
"abrogates",
"abrogating",
"abrogation",
"abrogations",
"abrogative",
"abrogator",
"abrogators",
"abrupt",
"abrupter",
"abruptest",
"abruptly",
"abruptness",
"abs",
"abscam",
"abscess",
"abscessed",
"abscesses",
"abscessing",
"abscise",
"abscised",
"abscises",
"abscising",
"abscissa",
"abscissae",
"abscissas",
"abscission",
"abscissions",
"abscond",
"absconded",
"absconder",
"absconders",
"absconding",
"absconds",
"absence",
"absences",
"absent",
"absented",
"absentee",
"absenteeism",
"absentees",
"absenter",
"absenters",
"absentia",
"absenting",
"absently",
"absentminded",
"absentmindedly",
"absentmindedness",
"absents",
"absinth",
"absinthe",
"absinthes",
"absinths",
"absolute",
"absolutely",
"absoluteness",
"absoluter",
"absolutes",
"absolutest",
"absolution",
"absolutions",
"absolutism",
"absolutist",
"absolutistic",
"absolutists",
"absolvable",
"absolve",
"absolved",
"absolver",
"absolvers",
"absolves",
"absolving",
"absorb",
"absorbability",
"absorbable",
"absorbed",
"absorbencies",
"absorbency",
"absorbent",
"absorbents",
"absorber",
"absorbers",
"absorbing",
"absorbingly",
"absorbs",
"absorption",
"absorptions",
"absorptive",
"abstain",
"abstained",
"abstainer",
"abstainers",
"abstaining",
"abstains",
"abstemious",
"abstemiously",
"abstemiousness",
"abstention",
"abstentionism",
"abstentionist",
"abstentions",
"abstentious",
"abstinence",
"abstinent",
"abstinently",
"abstract",
"abstracted",
"abstractedly",
"abstractedness",
"abstracter",
"abstracters",
"abstracting",
"abstraction",
"abstractionism",
"abstractionist",
"abstractionists",
"abstractions",
"abstractly",
"abstractness",
"abstractor",
"abstractors",
"abstracts",
"abstricts",
"abstruse",
"abstrusely",
"abstruseness",
"abstruser",
"abstrusest",
"absurd",
"absurder",
"absurdest",
"absurdities",
"absurdity",
"absurdly",
"absurdness",
"absurds",
"absurdum",
"abt",
"abubble",
"abundance",
"abundances",
"abundant",
"abundantly",
"abusable",
"abusage",
"abuse",
"abused",
"abuser",
"abusers",
"abuses",
"abusing",
"abusive",
"abusively",
"abusiveness",
"abut",
"abutment",
"abutments",
"abuts",
"abuttal",
"abuttals",
"abutted",
"abutter",
"abutters",
"abutting",
"abuzz",
"abyes",
"abysm",
"abysmal",
"abysmally",
"abysms",
"abyss",
"abyssal"
};
return colors;
}
private static int LinearSearch(List<string> list, string key)
{
for (int i = 0; i < list.Count; i++)
{
if (list[0] == key)
{
return i;
}
}
return -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment