Skip to main content

All Questions

3 votes
2 answers
708 views

Implement Immutable Collection in C#

I would like to define some constant sequences (of bytes, specifically) in my C# library/API. Both length and content should not vary, preferably by any means (barring reflection). To this end, a <...
nivk's user avatar
  • 235
9 votes
1 answer
783 views

Simple LinkedList

I guess this has been made a couple of times by now, but i wanted to take my chance on creating a simple generic linked list in c#. What do you think ? This is the main class. ...
Vlad Sandu's user avatar
2 votes
3 answers
199 views

Addition of 2 integers

I've implemented an algorithm found in a book. It adds 2 positive integers of equal size. How can it be improved? It is assumed that inputted data is always positive integers with an equal number of ...
gmail user's user avatar
3 votes
4 answers
4k views

Convert decimal to string

I wrote a C# program that converts decimal to string. It is not the best but it works. I'm looking for inputs from others on how ...
gmail user's user avatar
7 votes
2 answers
2k views

Class Matrix implementation

Following the 18.06 Linear algebra course, I was curious to reinvent the matrix class and basic functionality, like \$PA=LU \$ decomposition, Gauss elimination, finding inverse matrix etc. Any ...
pgs's user avatar
  • 922
11 votes
5 answers
6k views

Stopwatch class

I am learning C# and I have an exercise: Design a class called Stopwatch. The job of this class is to simulate a stopwatch. It should provide two methods: Start and Stop. We call the start ...
GohanP's user avatar
  • 213
3 votes
1 answer
661 views

C# basic dictionary (hash) implementation

I have implemented a very basic hash data structure with basic set/retrieve methods. A good example of use of this implementation would be a phone-book. I have used as underneath storage structure an ...
Joan Dimko's user avatar
2 votes
1 answer
369 views

StopWatch for users C#

I have tried to create a stopwatch and I have done but I don't know how to improve it, and I want the user control the stopwatch whether it (Start) or (Stop), I'll be thankful if you tell me what I ...
Eslam Ali's user avatar
8 votes
1 answer
5k views

Library, that finds the derivative of a function

I've written a small library, that provides a way to store mathematical expressions in a tree-like structure, and provides a method, that finds the first derivative of a function. I know, that there ...
Horváth Dávid's user avatar
16 votes
4 answers
2k views

String Queue implementation

Is the implementation clean enough & can be used in production? I tried to write clean & bug-free code. It looks good to me. I would appreciate any improvement suggestions. One question I ...
Pollob's user avatar
  • 163
5 votes
2 answers
23k views

LINQ and string.Split do it yourself practice

Problem Statement: Implement a sentence scanning functionality to parse the sentence and return a string to concatenate each word with its number of occurrences, sorted by the number of ...
Jianmin Chen's user avatar
  • 2,396
4 votes
0 answers
11k views

Logging into Database with ASP.NET Core

In the Startup.cs of my ASP.NET Core application I want to configure the LoggingFactory so that it logs into the database. ...
Palmi's user avatar
  • 141
1 vote
1 answer
92 views

Binary Search Optimization [closed]

Can anyone give me recommendations on how to improve my code? ...
nikolay's user avatar
  • 21
1 vote
2 answers
1k views

Optimizing a binary search algorithm

I have implemented a binary search algorithm in C#. Can anyone give me suggestions on improving its effectiveness? ...
Vasko Yanakiev's user avatar
7 votes
1 answer
872 views

Custom Big Integer class for Project Euler in C#

I'm trying to teach myself some programming and, working through the Project Euler problems, I've come across some instances where I've needed numbers that are larger than will fit into an int or long ...
Steelilack's user avatar

15 30 50 per page