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.Linq; | |
using System.Text; | |
using System.Diagnostics; | |
public class Program | |
{ | |
private static int loopCount = 5000; | |
private static void GetStringByCombinedExecution(StringBuilder myFirstStringBuilder, |
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 Singleton | |
{ | |
private static Singleton instance; | |
private Singleton() {} | |
public static Singleton Instance | |
{ | |
get{ | |
if(instance == 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
S.No | Operator | Associativity | |
---|---|---|---|
1 | ( ) | Left to Right | |
2 | [ ] | Left to Right | |
3 | . | Left to Right | |
4 | -> | Left to Right | |
5 | ++ -- | Left to Right | |
6 | ++ -- | Right to Left | |
7 | + - | Right to Left | |
8 | ! ~ | Right to Left | |
9 | (type) | Right to Left |
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; | |
namespace ExamineApp | |
{ | |
partial class Program | |
{ | |
static int[] Mergesort(int[] array, int startIndex, int endIndex) | |
{ | |
int midIndex; | |
if (startIndex < endIndex) |
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
int FindJosephusPosition(int n, int k) | |
{ | |
if (n == 1) | |
return 1; | |
else | |
return (josephus(n - 1, k) + k - 1) % n + 1; | |
} |