Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

two linked list intersection

public Node GetIntersectionNode(Node headA, Node headB) 
{
    if(headA ==null || headB==null)
    {
        return null; 
    }
    var a = headA; 
    var b = headB; 

    while(a != b)
    {
        a = a == null ? headB : a.next;
        b = b == null ? headA : b.next;
    }
    return a;
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity reflect raycast 
Csharp :: how to create url parameters for URi C# 
Csharp :: HTTP Error 500.35 - ASP.NET Core does not support multiple apps in the same app pool 
Csharp :: unity unit tests 
Csharp :: searching for keys in the registry 
Csharp :: c# optional arguments 
Csharp :: c# destroy function...unity 
Csharp :: C# linq mselect 
Csharp :: print c# 
Csharp :: combine two arraylist c# 
Csharp :: label wpf 
Csharp :: c# linq select specific columns 
Csharp :: c# access substring 
Csharp :: unity c# find object position in array 
Csharp :: how to update model in entity framework db first approach 
Csharp :: asp.net get most recent file in directory 
Csharp :: pubxml environment variables 
Csharp :: c# listview filter contains 
Csharp :: translate int to string with x 0 before c# 
Csharp :: top down view player movement 
Csharp :: how to print to printer in c# 
Csharp :: unity how to find the largest value out of 2 numbers 
Csharp :: referans tipi nedir c# 
Csharp :: bind repeater to dictionary 
Csharp :: convert word files to plain text c# 
Csharp :: 405 - HTTP verb used to access this page is not allowed 
Csharp :: print text c# unity 
Csharp :: c# get all occurrences of a string 
Csharp :: page parent wpf 
Csharp :: remove all values from list c# 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =