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 class Solution | |
{ | |
public int FindDuplicate(int[] nums) | |
{ | |
var i1 = nums[0]; | |
var i2 = nums[0]; | |
do | |
{ | |
i1 = nums[i1]; |
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
void Main() | |
{ | |
// 1. Generate CREATE TABLE command for the existing table. | |
// 2. Select only text with the columns definitions and copy to the Clipboard. | |
// 3. Run the code below. C# properties will be in the Clipboard. | |
var sql = Clipboard.GetText(); | |
var exclusions = new[] { "primary key", "constraint .*", "unique" }; | |
var typeMapping = new Dictionary<string, string> |