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
[ | |
{ | |
"id": 376, | |
"InstitutionCode": "090270", | |
"InstitutionName": "AB MICROFINANCE BANK", | |
"Category": "9", | |
"dump": null, | |
"created_at": "2020-03-02 20:44:54", | |
"updated_at": "2020-08-24 00:02:52", | |
"deleted_at": null, |
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; | |
namespace Monsoon_Umbrellas_Algorithm | |
{ | |
class Program | |
{ | |
public static int GetMinimumUmbrellas(int[] sizes, int requirement) | |
{ |
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
-- If you want to generate a new Guid (uniqueidentifier) in SQL server the you can simply use the NEWID() function. | |
SELECT NEWID() | |
GO | |
-- This will return a new random uniqueidentifier e.g. | |
E75B92A3-3299-4407-A913-C5CA196B3CAB | |
To select this Guid in in a variable | |
--assign uniqueidentifier in a variable | |
DECLARE @EmployeeID uniqueidentifier |
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
class Program | |
{ | |
private static readonly string[] two = { "a","b","c" }; | |
private static readonly string[] three = { "d", "e", "f" }; | |
private static readonly string[] four = { "g", "h", "i" }; | |
private static readonly string[] five = { "j", "k", "l" }; | |
private static readonly string[] six = { "m", "n", "o" }; | |
private static readonly string[] seven = { "p", "q", "r", "s" }; | |
private static readonly string[] eight = { "t", "u", "v" }; | |
private static readonly string[] nine = { "w", "x", "y", "z" }; |
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
class Program | |
{ | |
private static List<string> MinutesArray { get; set; } = new List<string>(); | |
static void Main(string[] args) | |
{ | |
string[] timeArray = { "16:15", "16:00", "12:20" }; | |
GetMinutesFromTimeArrayIntoMinutesArray(timeArray); | |
var result = MinimiumTimeDifference(MinutesArray); |
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
class Program | |
{ | |
private static List<int> Result { get; set; } = new List<int>(); | |
static void Main(string[] args) | |
{ | |
int[] nums = { 4, 1, 3 }; | |
int val = -1; | |
ShufflePupils(nums, val); |
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
class Program | |
{ | |
private static List<int> SingleArray { get; set; } = new List<int>(); | |
static void Main(string[] args) | |
{ | |
int[] classA = { 13, 15, 19 }; | |
int[] classB = { 11, 13, 18 }; | |
AddFirstArrayIntoSingleArray(classA); |
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
class Program | |
{ | |
private static int TotalNumber { get; set; } | |
private static List<int> Result { get; set; } = new List<int>(); | |
static void Main(string[] args) | |
{ | |
TotalNumber = 1; | |
int[] nums = { 4, 5, 10, 2 }; |
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
class Program | |
{ | |
private static List<int> ResultWhenValIsInArray { get; set; } = new List<int>(); | |
private static List<int> ResultWhenValIsNotInArray { get; set; } | |
static void Main(string[] args) | |
{ | |
ResultWhenValIsInArray.Add(-1); | |
ResultWhenValIsInArray.Add(-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
public static int RemoveNumberInstances(int[] nums, int val) | |
{ | |
if (nums == null) | |
{ | |
return 0; | |
} | |
else | |
{ | |
nums = nums.Where(arrayElement => arrayElement != val).ToArray(); |
NewerOlder