-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
133 lines (114 loc) · 5.44 KB
/
Copy pathProgram.cs
File metadata and controls
133 lines (114 loc) · 5.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
using System.Runtime.CompilerServices;
using System;
using System.Linq;
using LeetCode_Algorithms;
using static LeetCode_Algorithms._19;
using System.Reflection.Metadata.Ecma335;
using System.Net.WebSockets;
namespace Sandbox
{
public class Solution
{
public static void Main(string[] args)
{
//_1 twosumalgorithm = new _1();
//twosumalgorithm.TwoSum([3, 2, 4], 6);
//ListNode l1 = new ListNode(9);
//ListNode l2 = new ListNode(1);
//l2.next = new ListNode(9);
//l2.next.next = new ListNode(9);
//l2.next.next.next = new ListNode(9);
//l2.next.next.next.next = new ListNode(9);
//l2.next.next.next.next.next = new ListNode(9);
//l2.next.next.next.next.next.next = new ListNode(9);
//l2.next.next.next.next.next.next.next = new ListNode(9);
//l2.next.next.next.next.next.next.next.next = new ListNode(9);
//l2.next.next.next.next.next.next.next.next.next = new ListNode(9);
//_2 addtwonumbersalgo = new _2();
//addtwonumbersalgo.AddTwoNumbers(l1, l2);
//_3 longestSubstring = new _3();
//longestSubstring.LengthOfLongestSubstring("pwwkew");
//_4 medianAlgo = new _4();
//medianAlgo.FindMedianSortedArrays([1, 2], [3, 4]);
//_713 subarrayProductAlgo = new _713();
//subarrayProductAlgo.NumSubarrayProductLessThanK([10, 5, 2, 6], 100);
//Solution solution = new Solution();
//_5 palindromeAlgo = new();
//palindromeAlgo.LongestPalindrome("ccc");
//_8 atoiAlgo = new();
//atoiAlgo.MyAtoi("1234567890123456789012345678901234567890");
////_7 reverseintAlgo = new();
////reverseintAlgo.Reverse(-2654);
//_14 commonPrefixAlgo = new();
//commonPrefixAlgo.LongestCommonPrefix(["flower", "flow", "flight"]);
//_20 parenthesesAlgo = new();
//parenthesesAlgo.IsValid("{[]}");
//_28 firstStringAlgo = new();
//firstStringAlgo.StrStr("mississippi", "issip");
//_3223 minimumLengthAlgo = new _3223();
//Console.WriteLine(minimumLengthAlgo.MinimumLength("ucvbutgkohgbcobqeyqwppbxqoynxeuuzouyvmydfhrprdbuzwqebwuiejoxsxdhbmuaiscalnteocghnlisxxawxgcjloevrdcj"));
//Console.ReadLine();
//_2094 threeDigitEvenAlgo = new _2094();
//Console.WriteLine(string.Join(',', threeDigitEvenAlgo.FindEvenNumbers([2, 2, 8, 8, 2])));
//Console.ReadLine();
//_21 mergeTwoSortedListsAlgo = new _21();
//Console.WriteLine(mergeTwoSortedListsAlgo.MergeTwoLists(l1, l2));
//Console.ReadLine();
//_3463 sameDigitsAlgo = new();
//Console.WriteLine(sameDigitsAlgo.HasSameDigits("3902"));
//Console.ReadLine();
//_6 zigzagAlgo = new();
//Console.WriteLine(zigzagAlgo.Convert("PAYPALISHIRING", 3));
//Console.ReadLine();
//_7 reverseIntAlgo = new();
//Console.WriteLine(reverseIntAlgo.Reverse(-123));
//Console.ReadLine();
//_10 regExAlgo = new();
//Console.WriteLine(regExAlgo.IsMatch("bbbba", ".*a*a"));
//Console.ReadLine();
//_11 waterAlgo = new();
//Console.WriteLine(waterAlgo.MaxArea([1,8,6,2,5,4,8,3,7]));
//Console.ReadLine();
//_12 intToRomanAlgo = new();
//Console.WriteLine(intToRomanAlgo.IntToRoman(3749));
//Console.ReadLine();
//_3304 kthCharAlgo = new();
//Console.WriteLine(kthCharAlgo.KthCharacter(5));
//Console.ReadLine();
//_15 _3sumAlgo = new();
//Console.WriteLine(_3sumAlgo.ThreeSum([0, 3, 0, 1, 1, -1, -5, -5, 3, -3, -3, 0]));
//Console.ReadLine();
//_16 _3sumClosestAlgo = new();
//Console.WriteLine(_3sumClosestAlgo.ThreeSumClosest([-1, 2, 1, -4], 1));
//Console.ReadLine();
//_17 _letterCombAlgo = new();
//Console.WriteLine(_letterCombAlgo.LetterCombinations("23"));
//Console.ReadLine();
//_19 _removeNthAlgo = new();
//ListNode listNode = new ListNode(1);
//listNode.next = new ListNode(2);
//listNode.next.next = new ListNode(3);
//listNode.next.next.next = new ListNode(4);
//listNode.next.next.next.next = new ListNode(5);
//Console.WriteLine(_removeNthAlgo.RemoveNthFromEnd(listNode, 1));
//Console.ReadLine();
//_2264 largestSameDigitAlgo = new _2264();
//string result = largestSameDigitAlgo.LargestGoodInteger("6777133339");
//Console.WriteLine(result);
//Console.ReadLine();
//_18 foursomeAlgo = new();
//var result = foursomeAlgo.FourSum([2, 2, 2, 2, 2], 8);
//foreach(var i in result[0])
//{
// Console.WriteLine(i);
//}
//Console.ReadLine();
//_717 oneBitAndTwoBitCharactersAlgo = new _717();
//Console.WriteLine(oneBitAndTwoBitCharactersAlgo.IsOneBitCharacter([1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0]));
//Console.ReadLine();
_29 divideTwoIntAlgo = new();
Console.WriteLine(divideTwoIntAlgo.Divide(-2147483648, 2));
Console.ReadLine();
}
}
}