Calling all developers: let's challenge our minds for the battles to come

Posts: 7
Joined: Sun Jul 31, 2016 3:59 am

Calling all developers: let's challenge our minds for the battles to come

Postby cplusplus4eva » Mon Dec 11, 2017 2:14 am

I am a .NET Developer specializing in C# with ASP MVC and Web API.
I believe we need to keep our skills sharp which is why I would like this topic to be for tutorials and competitions that force us to push our development skills to the max and help us learn from each other. Besides C# I know PHP, Java, Java Script, Type Script, XML if you call that a language, Html 5/4.1, Ruby, Python, C++, C, Objective C, Swift, and VB.NET.
I would like each one of you to introduce your talents and I will share you problems that will enhance your skills and I also want to be challenged by you as fellow devs.
I am going share a list of problems that Microsoft gave me in an interview because no one else has on the web and they are easy questions:

1. find maximum consecutive repeating character in string.

Input : str = "aaaaaabbcbbbbbcbbbb"

Output :a

2. Merge two sorted arrays into one sorted array

int[] A = {1,5,7,12,18,32}

int[] B = {2,4,9,16,27,76,98}

3. Write a small method to do the below task.. this is not in sorted order.. all negative characters in left and positive on the right..

input = { 4, -3, 2, -5, 5, -1, 3}

output= {-3,-5, -1, 4, 2, 5, 3}

4. Segregate 0s on left side and 1s on right side of the array. Traverse array only once.

Input array = [0, 1, 0, 1, 0, 0, 1, 1, 1, 0]

Output array = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]

5. Given an unsorted array and a number n, find if there exists a pair of elements in the array whose difference is n.


Input: arr[] = {9, 29,10, 2, 50, 24, 100}, n = 50

Output: Pair Found: (50, 100)

6. Write a simple code for finding the most repeated character in given string

7. write a simple function to check if the Binary Tree is a Binary Search Tree.

8. Tic tac toe 3x3 solving

9. Tic tac toe check winner

10. Write a helper function to return input array data in small chunks by replacing \n with \r\n.

11. Combination of 3 numbers to match sum in array

12. Write a function to reverse the order of words in a string ?

13. Write a function to check if two strings are anagrams or not ?

14. Most Frequent Element in an array

15. Gave a solution using two for loops.

16. Function to print the Factorial of a given number

17. Most frequent number in an array

18. Tow Sum Problem

19. Most frequent element in an array

20. Check whether the string is unique or not.

21. Swap numbers without addl variable

22. consider there is largest array

23. char[] Input = new char[10000]; {a,b,\n,c,d,e,\n,f,g,\n,h,\n.........}

24. char[] output = new char[4];

25. find the length of the longest substring without repeating characters

26. string s = "abcabcbb" out put abc

27. Write a function that parses an input buffer and sends output of the size of output array. We should also return the position of the input buffer and the size used in the output array.

When the input array has '/n' we should return it as '\r ' '\n' as two separate characters.

Do all the validation and check for edge cases.

23. Design a data structure for Users and Groups in which

1.user will have some custom properties

2.Groups will have custom properties and Users in the group.

3.Groups can have multiple child groups and multiple parent groups.

4.When you detect a loop in the parent child relation don't accept that.

Problem Solving

29. Print Fibonacci Series

30. Swap Two Numbers, without Addl variable.

31. Check if the string is unique?

32. Swap Numbers without addl variable?

33. Difference between (Brute Force and Optimal solution)

Posts: 7
Joined: Sun Jul 31, 2016 3:59 am

The answers to the questions

Postby cplusplus4eva » Fri Dec 15, 2017 5:27 am

Hi so I decided to post my answers in C Sharp format in visual studio 2017.
Feel free to use my code if you are a student because you are my brothers in software development

Posts: 7
Joined: Sun Jul 31, 2016 3:59 am

Here's some hacking and dev sites that helped me as a junior dev

Postby cplusplus4eva » Fri Dec 15, 2017 5:59 am - this is a torrent site with software, games, movies but I use it for getting Dreamweaver when I had no money and then bought it later. Be Warned it has popups that try to get you to download malware. - a meta data search engine to download software - I used it to get Visual Studio 2010 when I was an intern before my university and then my job gave me the license. - it is a torrent site as you know and the popups advertise to you but do not hurt you when they popup a new window. - I am not sure if this still running but scan the torrents you download because after downloading I have found that 30% are viruses. - has a bunch of open source tools and programs to allow you to program and build your own apps without royalties. - you don't need an explanation of this famous Java and C++ ide. - well you can guess what this is. - is where the majority go for answers to programming questions are answered for free. My name on this site is StackTraceOrGTFO. - wii emulation and hacking but its legal if you own the game - kali linux replaced backtrack linux and is for ethical hacking using rainbow table and dictionary attacks of WPA 2 and WEP Wifi encryptions. - ios jailbreaking - free dev team git code version control for 5 devs or less

Return to “AnonHQ”

Who is online

Users browsing this forum: No registered users and 1 guest