Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
23 changes: 23 additions & 0 deletions Bit manipulation/find odd occuring elements in the array.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Find the elements whoch are odd occuring in the array
#include<iostream>
using namespace std;
int findOdd(int arr1[], int n1)
{
int result = 0;

for(int i = 0; i < n1; i++)
{
result = result ^ arr1[i];
}

return result;
}

int main() {

int arr1[]= {1, 5, 4, 6, 6, 5, 2, 2, 3}, n1 = 9;

cout<<findOdd(arr1, n1);
return 0;

}
Binary file not shown.