Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

single number c#

public int SingleNumber(int[] nums)
        {
         int sNumber = nums[0]; 
            if (nums.Length > 1)
            {
                for (int i = 0; i <= nums.Length - 2; i++)
                {
                    sNumber = sNumber ^ nums[i + 1];
                }
            }           
            return sNumber;
        }
Comment

PREVIOUS NEXT
Code Example
Csharp :: python mokeypatch asser called 
Csharp :: CharacterController 
Csharp :: unity debug log gameobject 
Csharp :: how to reset disk permission 
Csharp :: c# picturebox zoom 
Csharp :: download and run exe c# 1 button 
Csharp :: unity enable hdr picker 
Csharp :: delete an object c# 
Csharp :: php encrypt message encrypt() decrypt 
Csharp :: read dxf file c# 
Csharp :: asp.net web hooks 
Csharp :: math round to next integer c# 
Csharp :: Close Form After fixed time 
Csharp :: Set database timeout in Entity Framework 
Csharp :: wpf settings core 
Csharp :: c# text editor 
Csharp :: tee into file 
Csharp :: oldest living language 
Csharp :: c# fold list 
Csharp :: windows forms webbrowser goback 
Csharp :: unity use of possibly unassigned field struct 
Csharp :: isdaylightsavingtime in c# 
Csharp :: Valid date check with DateTime.TryParse method 
Csharp :: unity editor window mesh field 
Csharp :: .net core get exe path 
Csharp :: constructor in protobuf-net 
Csharp :: C# Project File Create 
Csharp :: FileSystemEventHandler raised twice 
Csharp :: palindromes 
Csharp :: c# loop array backwards 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =